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.

5
  • 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
    Commented Sep 28, 2018 at 19:46
  • @davidPostill oh... I was almost done typing my answer... This is not too broad. It just needs a settings tweak... :(
    – LPChip
    Commented Sep 28, 2018 at 19:52
  • @LPChip Ah. Reopened ...
    – DavidPostill
    Commented Sep 28, 2018 at 19:53
  • @DavidPostill thanks. I'll restart typing my answer...
    – LPChip
    Commented Sep 28, 2018 at 19:54
  • It is not shut down. Commented Sep 28, 2018 at 20:05

1 Answer 1

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.

3
  • I'll give that a try! Commented Sep 28, 2018 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. Commented Sep 28, 2018 at 20:10
  • You can try without the 1 minute delay, but that will more likely overlap the task.
    – LPChip
    Commented Sep 28, 2018 at 20:17

You must log in to answer this question.

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