1.

Solve : How to create a batch file that creates a scheduled task?

Answer»

I have a jar file that I want to create as a scheduled task to run every hour. I want to create a batch file to create that scheduled task because I can then give that batch file and jar to the person who will need to SET it up on our production system.

does anybody know how to create a scheduled task from a batch file?

thank you

Danielyou can use the at command. TYPE at /? at command promptHere's the batch file that creates a scheduled task (for anybody that is looking for the same thing)

schtasks /create /tn "emailError" /tr "JAVA -jar C:\report_email\ErrorEmails.jar SQLuser SQLpass" /sc HOURLY /st 06:00:00 /sd 09/14/2007 /ru winUser /rp winPass

http://support.microsoft.com/kb/814596 - was really helpful to figure out what commands do what and how to use them.



Discussion

No Comment Found