Schedule Tasks with Command Prompt
There’re so many available ways to create schedule tasks in Windows XP. From command line until GUI tools, you can choose one from them. And then I curious to try the command line schedule tasks tools which have bundled by Windows XP. The tools are at command and schtasks command.
The at command is an old command that avaiable since Windows 2000 (correct me if I wrong), you can create remote tasks with this command. And best part from at command is it has simple parameters. Just put some parameters with it and then a task will created. On other side with schtasks command you can create complex tasks but maybe you can confused with its parameters that so complicated.
OK, first we will learn about at command.
- To use at command, open your command console first via Start -> Run menu and then type
cmdin textbox or via Start -> All Programs -> Accessories -> Command Prompt. - At prompt type
at /?if you want get some help fromatcommand. - To create a remote task, just type
at \\server 6pm /every:sunday "winword.exe", we can learn from that command parameters,\\serveris your remote computer, 6pm is the time that the task will ran,/every:sundayis day parameter and last “winword” is task will ran.

- If you want display all running tasks just type at on prompt.

- To delete a task, type
at 2 /delete, number 2 is id task you can look it with typing at at your prompt (point 2),/deleteis parameter to delete a task. To delete entire tasks, typeat /delete.

- Almost forgeted, if you want create a local task, just type
at 6pm /every:sunday "test.bat", you can look the explaining in point 3.

Now, I want discuss about schtasks command.
- To create a task with
schktakscommand, typeschtasks /create /ru system /sc weekly /d fri /tn "Remain me to make report" /tr "excel.exe" /st 19:00:00. And this is the explanation from that command;/createis parameter to create task,/ruis parameter to set user that run this task,/scis paremeter to defines frequency the task will ran you can choose MINUTE, HOURLY, DAILY, WEEKLY, MONTHLY, ONCE, ONSTART, ONLOGON, ONIDLE for parameter value,/dis day to run,/tnis parameter to task name,/tris parameter to set task to run,/stis parameter to start to run.

- To display all run tasks type
schtasksat prompt.

- To display all tasks that have been created with
atcommand orschtaskscommand you can display it with Scheduled Tasks software that run in GUI mode. To open it click Start – All Programs – Accessories – System Tool - ,

and look what happend with your all tasks in there.

- And to delete task with
schtaskscommand, typeschtasks /delete /tn "Remain me to make report" /F,/tnfill with your task name,/fparameter is parameter to forces the utility to delete the task and suppress any warnings when the task is currently running.

- To display all schtasks parameter type
schtasks /?or if you want detail about/deleteparameter or else, typeschtasks /delete /?at your prompt.
I hope your job to scheduling your task will be more easier.
note:
Whaever the method you take to create scheduled tasks don’t forget to activate Task Scheduler Service (by default, Windows XP always activate it), to learn more about Activate Windows Service, look here.

![Otak Atik [dot] Com](http://www.otakatik.com/wp-content/themes/typebased/styles/default/logo.jpg)


Recent Comments