2

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

13
  • Does your system record an event 42 when the screen turns off? Commented Jul 13, 2020 at 22:03
  • @music2myear Thanks for your comment. How to know that?
    – Tak
    Commented Jul 13, 2020 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. Commented Jul 13, 2020 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
    Commented Jul 13, 2020 at 23:16
  • Now you know you've picked the wrong trigger. Commented Jul 13, 2020 at 23:26

1 Answer 1

1

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

1
  • 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
    Commented Jul 14, 2020 at 6:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .