1

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.

5
  • 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
    Commented May 31, 2015 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
    Commented May 31, 2015 at 3:18
  • sorry, I rephrased my question.
    – Xianlin
    Commented May 31, 2015 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
    Commented Jun 1, 2015 at 6:29
  • using scheduled task is more straight forward to me. lazy to code...
    – Xianlin
    Commented Jun 1, 2015 at 8:42

1 Answer 1

1

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

1
  • You are the MAN!
    – Xianlin
    Commented May 31, 2015 at 15:18

You must log in to answer this question.

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