Run Program When Windows Resumes from Sleep or Hibernate

Print View Mobile View

There are many event triggers available in Task Scheduler, such as at log on, at start up, and so on. But there’s no option that will run a program when the computer wakes up from Sleep or Hibernate. If you need to run a program on resume from the suspend state, follow below steps:

Run Program on Resume from Sleep/Hibernate with Task Scheduler

  1. Open Task Scheduler and click on “Create a Task” to create a new task.
  2. In the new panel which opens, fill the “General” tab to suit your needs.
  3. Next, switch to the “Triggers” tab and choose “New”. Another Panel will open. At the top of this Panel, choose “On an event” from the drop-down menu.
  4. Then choose “Custom” under Settings, and hit “New Event Filter”. Create a “Custom Event Filter” with:
  5. Event Level: Information
    Log Name: System
    Source: Power-Troubleshooter
    Event ID: 1
    Task Scheduler Edit Events

  6. That was the important part. Now switch to the Actions tab and choose the program you wish to run.
  7. In Conditions tab, uncheck the option labeled “Start the task only if the computer is on AC power”.
  8. Finally, save the task by clicking on OK.

That’s it! Now, whenever your computer resumes from sleep or hibernate, your program will run.

If you don’t want to go through all those steps, and would like a simpler option, try out a free program called Hibernate Trigger.

Hibernate Trigger is a small portable program that detects when your computer is put into or resumes from Sleep or Hibernate mode. It will then halt the operation and run a program you want.

The program’s interface is very minimal, consisting of only two fields. In the first field, you can provide path to a program you want to run when computer goes into Suspend state, and in the second field, enter path to the program you want to run on resume. Just leave the field empty you don’t want to use.

Hibernate Trigger

In the fields, you can provide path to a single program or file. If you wish to run multiple processes, you’ll have to create a batch script.

Do note that when a program is executed during the suspend state, system is halted only for a maximum of 20 seconds. After that, Windows will try to forcefully terminate the process. There’s no such limitation when a program is started on resume.

Download: Hibernate Trigger