Skip to content

Instantly share code, notes, and snippets.

@joshcooper
Created January 30, 2014 00:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joshcooper/8700195 to your computer and use it in GitHub Desktop.
Save joshcooper/8700195 to your computer and use it in GitHub Desktop.
scheduled_task { 'Test':
ensure => present,
enabled => true,
command => 'C:\Program Files\Microsoft SQL Server\100\Tools\Binn\SQLCMD.exe',
arguments => "-Q \"EXECUTE [master].[dbo].[DatabaseBackup] @Databases = 'ALL_DATABASES', @Directory = N'C:\\backups\\sql'\" -b -o C:\\backups\\sql\\logs\\DatabaseBackup.txt",
trigger => {
schedule => daily,
start_date => '2013-12-30',
start_time => '20:00',
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment