Customize Windows Task Scheduler

1

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.

susik

Posted 2015-12-30T03:25:51.773

Reputation: 447

Answers

2

I think you're saying that 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 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 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

Pimp Juice IT

Posted 2015-12-30T03:25:51.773

Reputation: 29 425

great! I'll give it a shot – susik – 2015-12-30T14:07:05.097

sure thing, I just configured and started and keep an eye for 24 hours to verify. Thanks anyway – susik – 2015-12-30T22:50:00.433

It worked like a charm :) – susik – 2015-12-31T22:08:04.087

I don't know how to close the ticket ... but it definitely could be closed as resolved – susik – 2015-12-31T22:08:44.893