Adrian Collier - schtasks

schtasks

schtasks is a windows command line utility that allows you create tasks and perform them at specified intervals. I wrote a batch script to backup my data and needed a method to run it once every night. Here's an example I used.


schtasks /create /SC DAILY /TN Backup /TR "\"C:\backup.bat\"" /ST 03:00


Here's how it works. schtasks is the command and /create sets a new scheduled command. /SC DAILY specifies the frequency and /TN Backup specifies a name which identifies your scheduled task. /TR "\"C:\backup.bat\"" specifies the path and file name of the task to be run at your set schedule. The important thing to keep in mind is to escape the quotes. /ST 03:00 sets the start time in the 24-hour format.


<
>