How to create a Schedule Task from command line

Tuesday, May 24, 2011

The following command will create a new Schedule Task named "MyTaskName". The task would run in each day at 00:00:00.The Schedule Task will execute the script "c:\scrips\myscripyname.vbs" by using the local Administrator privilege. schtasks /create /tn "MyTaskName" /tr c:\scrips\myscripyname.vbs /sc DAILY /st 00:00:00 /ru Administrator /rp MyAdministratorPassword   To verify the Schedule Task exits,  please use the command bellow: SCHTASKS /query   To delete the Schedule Task, please use the command bellow  SCHTASKS /Delete /TN MyTaskName /F
no comments