1

I have a Windows Task Scheduler set up to run something every hour. I do this by having it run daily, starting at 12:01 pm, and repeat the task every 1 hour, for a duration of 1 day.

This mostly works, but it sometimes doesn't run at 11:01 am the next day (the last instance). I look at the history log, and it doesn't even attempt to run that last run. It runs normally at 9:01 and then 10:01 and then it is done.

Because it runs daily, it restarts at 12:01. But I need it to reliably run every hour, every day. Are there better ways to schedule this so it doesn't drop the 11:01 run?

This is on a Windows 10 virtual machine.

Note: it's VERY important that this run at 1 minute past the hour. That can't change over time, and even being off by 1 minute would make other processes fail.

  • Is the virtual machine shut-down for the night? Ensure also that the task is not in any way dependent on the outcome of any other process or OS event. – harrymc Sep 28 '18 at 19:46
  • @davidPostill oh... I was almost done typing my answer... This is not too broad. It just needs a settings tweak... :( – LPChip Sep 28 '18 at 19:52
  • @LPChip Ah. Reopened ... – DavidPostill Sep 28 '18 at 19:53
  • @DavidPostill thanks. I'll restart typing my answer... – LPChip Sep 28 '18 at 19:54
  • It is not shut down. – thursdaysgeek Sep 28 '18 at 20:05
0

You need to alter your settings a little bit for this to work more reliably.

On the Trigger itself, instead of making it end after 1 day, you want to make it end after: indefinitely. Aka, it keeps running.

On the Settings tab at the bottom, it says: If the task is already running, the following rule applies: Stop the existing instance.

It is now possible for the instances to overlap, and depending on what your task does, that may not be desired. To combat this, go back to your trigger and check Delay the task up to: 5 minutes. Yes, you can actually type that value in there.

Also check Stop the task if it runs longer than: 1 day.

  • I'll give that a try! – thursdaysgeek Sep 28 '18 at 20:06
  • Um, before I do that, it's super, super important that it run at 1 minute past the hour. So delaying up to 5 minutes would be fine, as long as it is the overlapping task that is delayed. I think I'll need to wait until Monday to make the change, so I'm here if there are issues. – thursdaysgeek Sep 28 '18 at 20:10
  • You can try without the 1 minute delay, but that will more likely overlap the task. – LPChip Sep 28 '18 at 20:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.