nce upon a time it’s starting to get hot where I live, and I want to make my computer automatically hibernate at night and wake up in the morning, in order to reduce power consuption and heat. I need it on during the day, because it acts as a VPN and media server, but at night it gets no use. I only leave it on so that I don’t have to remember to turn it on in the morning, and because my wife leaves applications and documents open that I don’t know if I can close without her getting mad.
I did some looking into the problem and found many articles about how to use Scheduled Tasks to sleep/wake up the machine. But they don’t both work at the same time; they are mutually exclusive. Either you can hibernate the computer automatically and then wake it up manually, or you can wake the computer automatically and hibernate it manually. More specifically, the articles recommended using a scheduled task with the “Wake the computer to run this task” option set, to automatically wake the computer. And they recommended a scheduled task with the command “C:\WINDOWS\system32\rundll32.exe powrprof.dll, SetSuspendState” to automatically send the computer to sleep. However, this sleep approach somehow disables the computer’s ability to automatically wake up the computer because it disables wake events.
I was dissapointed to find this because I wanted a Windows native solution, and because I had already sunk so much time into the effort. But after grieving for awhile, I got over it and found a third party program that works well. Apparently the author of the program felt the same pain that I did and coded it himself. It’s called WakeupOnStandBy. Use it if you need to both automatically wake and and hibernate your computer.
Sources: How To Put the System into hibernation or Standby from Run menu, Automatically wake a hibernating Windows XP machine
UPDATE: I don’t use WakeupOnStandBy anymore. I do this instead:
- Go to Power Options in Control Panel and create a power profile called “day_power” that is set to never standby or hibernate, and a power profile called “night_power” that is set to hibernate after 20 minutes.
- Create a Scheduled Task called “day_power” with the following options:
- Schedule: Daily at 8:00AM
- Other settings: Wake up the computer to run this task
- Command: C:\WINDOWS\system32\powercfg.exe /S “day_power”
- Create a Scheduled Task called “night_power” with the following options:
- Schedule: Daily at 10:40PM
- Other settings: Wake up the computer to run this task
- Command: C:\WINDOWS\system32\powercfg.exe /S “night_power”
2 Comments
This is exactly what I want to do but I keep getting invalid file name errors when I enter C:\WINDOWS\system32\powercfg.exe /S “day_power” and C:\WINDOWS\system32\powercfg.exe /S “night_power”. I have created the profiles and the task scheduler will take the commands without the switch.
It may have something to do with the quotation marks. Try it without the quotes, or with the quotes enclosing the whole statement.