Scheduling PC to Hibernate in Vista

Scheduling a task is easy in Vista. The new and improved Task Scheduler make task scheduling a lot more easier. In this guide, I’ll use the Task Scheduler to schedule my PC to hibernate at a specific time.
Read on for the full guide.
  1. Before we start scheduling the task, we need to create a batch file. This batch file will contain a command that will send windows into hibernate mode. Paste the following code in a notepad and save it as “hibernate.bat”. Make sure that the file type is “bat” and not “txt”.

    shutdown /h

  2. First, open the Task Scheduler. It is located at Start -> All Programs -> Accessories -> System Tools -> Task Scheduler.
  3. Task Sceduler Step 1

    Click on the "Click Basic Task..."

  4. After you open the Task Scheduler, click on the “Click Basic Task…” option located on the right side of the window.

    Task Sceduler Step 1

    Fill in the name and description of the task

  5. In the “Create Basic Task Wizard” windows, fill in the name and description of the task.
  6. Task Sceduler Step 2

    Select when you want to start the task

  7. Select one of the method that you’ll want the scheduler to execute the task. For my case, I’ll select weekly since I want to execute my task on a weekly basis.
  8. Task Scheduler Step 4

    Select the start date of the task

  9. On the next screen, the will be some options for you to select. This screen will be base on whatever you select on the previous screen. If you selected weekly, you can select the start date and time, how often the task recur and the days the task will be executed.
  10. Task Scheduler Step 5

    Select "Start a program"

  11. Next, there will be 3 options that you can select. Since we are going to schedule the PC to hibernate, we select “Start a program”.
  12. Task Scheduler Step 6

    Browse for the batch script that we created earlier

  13. On this screen, you need to select a program/script that you want to run by the scheduler. Select the batch file that we created earlier and click next.
  14. Task Scheduler Step 7

    Review the task

  15. Review the details of the task and click Finish.
  16. You are done! Now the task is scheduled and will execute on the time that you specified in the scheduler. This task will put you PC into hibernate mode on the scheduled time.

Hope this will guide will help you save some electricity by hibernating your PC!

About HMMaster

I'm just an IT guy working in the IT world. I love to explore new things and the web is the best way to explore!
This entry was posted in Guide and tagged , , , . Bookmark the permalink.

5 Responses to Scheduling PC to Hibernate in Vista

  1. UncleWilbur says:

    Cool trick, thanks much!

  2. Oscar says:

    Is it possible to run a task after resume from hibernation (for example run an application). By the way, thanks for the tutorial).

  3. Oscar says:

    Sorry, but I forgot the question mark:
    Is it possible to run a task after resume from hibernation ?

  4. JVS says:

    If you make the .bat file a bit more complex, then you can get a fair warning before the shutdown occurs (and give you time to abort).
    ——————–hibernate.bat——————————
    @ECHO OFF
    REM
    REM This command is run by the Windows Task Scheduler
    REM See http://khimhoe.net/2008/09/05/scheduling-pc-to-hibernate-in-vista/
    REM Use a \choice\ command to tell you what the system will do in 60 sec
    REM w/o user action
    choice /T 60 /D y /M \Allow shutdown in 60 seconds? (Enter N or n to stop it)\
    IF ERRORLEVEL ==2 GOTO ABORTED
    IF ERRORLEVEL ==1 GOTO SHUTDOWN
    @echo \Neither error level detected…Should be impossible\
    :SHUTDOWN
    @echo System is being sent into hibernation mode
    time /T
    shutdown /h
    GOTO END
    :ABORTED
    @echo System shutdown has been aborted
    :END
    @echo hibernate.bat completed processing

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.