I have a script that I want to execute using Task Scheduler at certain intervals that are different:
- I want it to run every hour in the day time (between 8 AM and 11 PM)
- I want it to run every 10 minutes late night and early morning (between 12 AM and 7 AM).
Could someone advise me if Windows Server 2008 R2 Task Scheduler is customizable for that?
I could just have two Scheduled Tasks that use the same script, with each on a different schedule (on for the hourly and another for the every 10 minute schedule)... But I'd prefer to have one Scheduled Task if that's possible.
Answer
I think you're saying that you want the same ONE task scheduled with Windows Task Scheduler to run:
- Every 10 minutes between 12 AM and 7 AM every day (starting at 12 AM first run and ending at 7 AM last run)
- You need this to also run between 8 AM and 11 PM every hour every day (starting at 8 AM for the first run and ending at 11 PM for the last run)
This is possible scheduling it with multiple triggers as shown in the below screen shots. When you create the task with Task Scheduler, go to the Triggers
tab, select New, and you'll get the options to specify as in the below screen shots.
You may have to pick the 12 hours option from the for duration of
drop down and then replace the "12" with "7" or "15" where applicable manually with the keybooard.
(Essentially you are creating two schedules\triggers with one starting at 12 AM and running for a duration of 7 hours (until 7 AM) every 10 minutes, and the other starting at 8 AM and running for a duration of 15 hours (until 11 PM) every 1 hour.)
Important Options to Pick (per below screen shots)
- The
Settings
area options needs to be set toDaily
- The
Start:
time needs to be specified correctly - The
Recur every:
option needs to be 1days
- The
Repeat task every
option needs checked, and specified correctly - The
For duration of:
needs to be specified correctly - The
Enabled
option needs to be checked
No comments:
Post a Comment