I have a task in task scheduler and I want to run this task once the screen sleeps not the computer. I’ve tried setting the Trigger to be “On Idle” but didn’t work, and I tried setting the trigger to be “On an event” and chose Log “System” and source ID to “Kernel-Power” and Event ID to “42” but still didn’t work as it works when the system itself sleeps not the screen. Could anyone please advise how I can run the task when then screen go to sleep not the PC itself?

enter image description here

  • Does your system record an event 42 when the screen turns off? – music2myear Jul 13 at 22:03
  • @music2myear Thanks for your comment. How to know that? – Tak Jul 13 at 22:13
  • The Event Viewer is typically where you see system events. If you're not familiar with that I strongly suggest you learn more about it. If you wish to trigger a task based on a specific event ID you'll need to know that your system is generating these IDs at the time you expect. – music2myear Jul 13 at 23:13
  • @music2myear Oh yes, sorry I misunderstood your question. Yes, I see that the system records event 42 when the computer sleeps not when the screen sleeps, any advice? – Tak Jul 13 at 23:16
  • Now you know you've picked the wrong trigger. – music2myear Jul 13 at 23:26

There are no consistent events triggered based on screen power state changes, therefore there is no way to trigger a task based on this.

| improve this answer | |
  • As per your advice, answered accepted and upvoted. I have asked another question here if you could check and advise please superuser.com/q/1568457/391215 – Tak Jul 14 at 6:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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