2

I have a script that I want to execute using Task Scheduler at certain intervals that are different:

  1. I want it to run every hour in the day time (between 8 AM and 11 PM)
  2. 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.

1 Answer 1

3

So you want the same one task scheduled with Windows Task Scheduler to run:

  1. Every 10 minutes between 12 AM and 7 AM every day—starting at 12 AM first run and ending at 7 AM last run
  2. 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 by scheduling it with multiple triggers as shown in the below screen shots and the Important Options to Pick section.

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 keyboard.

Essentially you are creating two schedules\triggers...

  • One starting at 12 AM and running for a duration of 7 hours (until 7 AM) every 10 minutes.
  • 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 to Daily
  • The Start: time needs to be specified correctly
  • The Recur every: option needs to be 1 days
  • 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

enter image description here enter image description here enter image description here

1
  • It worked like a charm :)
    – susik
    Commented Dec 31, 2015 at 22:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .