Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: How to create a batch file that creates a scheduled task  (Read 27544 times)

0 Members and 1 Guest are viewing this topic.

caboclo975

  • Guest
How to create a batch file that creates a scheduled task
« on: September 13, 2007, 09:10:41 AM »
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

Daniel

ghostdog74



    Specialist

    Thanked: 27
    Re: How to create a batch file that creates a scheduled task
    « Reply #1 on: September 13, 2007, 10:19:00 AM »
    you can use the at command. type at /? at command prompt

    caboclo975

    • Guest
    Re: How to create a batch file that creates a scheduled task
    « Reply #2 on: September 20, 2007, 09:13:50 AM »
    Here'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.