Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Enable schedule task using a batch file

I need to enable a schedule task through a batch file, this schedule task is set to run every 2 mins once enabled. Using SCHTASKS /Run -- run the task but only once it does not care about the schedule i.e to run every 2 mins

I need to do this through a batch file. I am using Windows 2003 server.

Please guide.

like image 844
RS developer Avatar asked Jun 16 '11 10:06

RS developer


2 Answers

schtasks /change /tn "TaskNameGoesHere" /ENABLE
like image 156
ba__friend Avatar answered Sep 23 '22 06:09

ba__friend


You can do it in Batch. You can use schtasks /? or visit http://ss64.com/nt/schtasks.html. You can get very granular with your options and there are many switches available to use. Customize to your heart's desires.

like image 41
Anthony Miller Avatar answered Sep 25 '22 06:09

Anthony Miller