Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I don't want task scheduler or whatever to wake the computer, but when I open the laptop back up and the machine wakes I'd like that to be the trigger that task scheduler or something uses to run an app.

share|improve this question

2 Answers 2

up vote 8 down vote accepted

You can tick the “Run task as soon as possible after a scheduled start is missed” checkbox on the Settings tab for the task. That's for tasks at least that are scheduled regularly and fail to start due to sleep/hibernate/shutdown.

There doesn't seem to be a trigger "On waking from sleep", but you can probably use the “On Event” trigger. The interesting events seem to be from “Kernel-Power” and “Power-Troubleshooter”. System sleep generates an event from Kernel-Power with event ID 42. Wakeup is an event from Power-Troubleshooter with event ID 1.

share|improve this answer
    
Perhaps I'm not talking about the right even, but I can't seem to get it to work. Basically I'm looking to start the task after putting the notebook computer to sleep (or whatever the actual state happens to be) when I reopen the lid and it comes back on. Usually at this point I have to type in the user password to get access to the system. I've played around with some of the event that seemed relevant to that as well, with no luck. –  Adam Dec 22 '09 at 17:50
    
"Kernel-Power with event ID 42" worked for me on Windows 7 when activating a bat-file on return from sleep mode –  user106681 Nov 24 '11 at 11:05
    
For wake-up, Power-Troubleshooter did not work for me. The only event that gets fired is Kernel-General with ID 1. –  anno Apr 4 '12 at 12:53

The event-based solution suggested by Johannes worked well for me. I wanted a certain text file (my to do list) to open in Notepad every time I un-hibernated my computer (Windows 7). I set up a scheduled task to run with this event as a trigger:

  • Log: System
  • Source:Power-Troubleshooter
  • Event ID: 1

This is working well for me.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.