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.
1So 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 – 2015-05-31T03:09:31.947
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 – 2015-05-31T03:18:13.843
sorry, I rephrased my question. – Xianlin – 2015-05-31T06:27:31.393
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 – 2015-06-01T06:29:56.160
using scheduled task is more straight forward to me. lazy to code... – Xianlin – 2015-06-01T08:42:30.070