5

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?

2 Answers2

3

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).

rtf
  • 12,826
1

In addition to the answer suggesting the use of the Task Scheduler, which may be the best option to use, here are two other things to consider for switching on the computer:

Some BIOS have an option to turn the PC on at scheduled times

  • pro: windows doesn't have to sleep, can be fully shut down. (if it turns out that the Task Scheduler can only handle it's task if Windows has been set to sleep).
  • cons: If you want to disable it for one day or edit the time you'll have to enter the BIOS

Use another computer like a Raspberry Py to send a WOL (wake on lan) packet to the machine.

  • pro: windows doesn't have to sleep, can be fully shut down. the other computer can also be used to monitor that machine, ie via SNMP and for other stuff.
  • cons: uses extra power (about 3.5 watts for a raspberry py)
Daniel F
  • 1,052