Skip navigation

Once 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 menuAutomatically wake a hibernating Windows XP machine

UPDATE: I don’t use WakeupOnStandBy anymore. I do this instead:

  1. 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.
  2. 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”
  3. 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”
Advertisements

8 Comments

    • Brent
    • Posted December 18, 2009 at 9:45 PM
    • Permalink

    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.

    • rotwhiler
    • Posted December 22, 2009 at 11:38 AM
    • Permalink

    It may have something to do with the quotation marks. Try it without the quotes, or with the quotes enclosing the whole statement.

    • Anonymous
    • Posted October 16, 2011 at 8:40 AM
    • Permalink

    Very slick, just what I needed.

    • Christofer
    • Posted January 13, 2012 at 1:40 PM
    • Permalink

    Exactly what I was looking for … this is perfect. Thank you!

  1. I have been after something like this for a while but, although both batch files run successfully when double clicked, once I am hibernating the day power batch file will not wake up my laptop at the scheduled time. If I manually wake my machine then the batch file runs immediately it’s booted. Any ideas gratefully received.

    • tom.simanovich@gmail.com
    • Posted May 1, 2012 at 6:47 AM
    • Permalink

    I can’t seem to get the wakup to work either, Summit Photography, did you have any luck getting the wakeup to work?

    • Anonymous
    • Posted December 11, 2012 at 9:25 PM
    • Permalink

    nice WORK, perfect solution!

    • Anonymous
    • Posted December 15, 2012 at 7:41 AM
    • Permalink

    My computer’s BIOS has a scheduled power-on feature that I use to wake my computer back up. With that, all I need to set up with the scheduled tasks is switching it to a power scheme that sleeps or hibernates as I desire for the given day (weekdays vs. weekends). Thanks for the ideas!


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: