Windows – Power Management: Have Win 7 box turn on and off at a scheduled time

power-managementscheduled-taskssleepwindows 7

I sometimes need to run a batch job on my Win 7 Pro workstation at a fixed time. I use the scheduler to make sure the task runs then. But, I need to disable sleep beforehand, which wastes lots of power.

To keep things green, how can I tell my PC to awaken from sleep at 3 and go back to sleep at 3:30?

Best Answer

  • If you pop open Task Scheduler and click Create Task, there's a check box under the Conditions tab that will wake the computer to run the task:

    enter image description here

    You could run your batch job from there, and create another task to put the PC back to sleep, or run the shutdown command in your batch job after it finishes (as long as there's a way to tell it has finished.)

    There's a few ways to put the computer back to sleep detailed in this question; I like the PsShutdown option the best (psshutdown -d -t 0).