I have a program will run continuously for 12 hours from 7am to 7pm. I have enabled it to run at 7am every day and stop it by 7pm by using windows task scheduler.

It works fine except that if I reboot computer during 7am and 7pm, after reboot the task will not run because it is already past 7am.

I created another same task schedule to run the program after start up, but if I reboot the computer during 7pm to the next day 7am, the task will run at the wrong time (7pm to 7am at night!) because it is triggered by reboot.

How to get the program run from 7am to 7pm and also endure the reboot incident? Thank you.

  • 1
    So if you reboot at 8am, then the task that has already run that day at 7am won't run the next day at 7am again? That makes no sense and is not the way it's supposed to work if you've configured the schedule correctly. – Karan May 31 '15 at 3:09
  • What exactly is your question? Do you mean, you want to run a scheduled task on 7 am or if the computer was turned off, start it as soon as its turned on? – LPChip May 31 '15 at 3:18
  • sorry, I rephrased my question. – Xianlin May 31 '15 at 6:27
  • Sounds like rather than a scheduled task what you want to do is have a batch file that runs at every boot that checks the time and if it is between your criteria then it runs the application. – Mokubai Jun 1 '15 at 6:29
  • using scheduled task is more straight forward to me. lazy to code... – Xianlin Jun 1 '15 at 8:42

Right Click on the task -> Properties -> Settings tab -> check the Run task as soon as possible after a scheduled start is missed checkbox:

enter image description here

  • You are the MAN! – Xianlin May 31 '15 at 15:18

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.