Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

create multipe scheduled tasks

Status
Not open for further replies.

krammer

IS-IT--Management
Jul 15, 2007
59
0
0
US
Hello,

I am trying to figure out how to write a script for multiple scheduled tasks for a single task. For example:

Run at 8pm Mon-Thu, 10pm Fri and at 8am on the last day of each month. So you see I want to use different times, 8pm, 10pm and so on. This is just an example, there will be dozens of different times for the same task.

I could script something like this:

Code:
schtasks /create /tn "My App" /tr c:\apps\myapp.exe /sc weekly /d "MON WED FRI" /m MAY,JUN /st 06:00:00

But as you can see it will still only be for that specific time (6:00AM). The times have to match with the days that I want. Does anyone know how to script multiple times? I am trying to mimic the GUI version of schedule tasks where you can check the box "show multiple tasks" and can do it that way...

Thanks to anyone who can help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top