With schtasks.exe (Windows Task Scheduler for command prompt), you can make a task that is triggered on idle, which I use. However, is it possible to make a trigger on resume from idle? I.E., when the computer is no longer idle?
Asked
Active
Viewed 837 times
1 Answers
3
There is no trigger on idle end, but there is one for idle start. Here is an idea how to use it for solving the problem :
Create a scheduled dummy task for which :
- Start condition is On idle
- Stop condition is if the computer ceases to be idle
Create another task that waits for the dummy task to start, and triggers the wanted action when it stops.
Use whatever tools fit the job, such as perhaps AutoHotkey.
harrymc
- 480,290
-
Ok I can probably use a simple bat file using task list. Thank you! – Mark Deven Sep 15 '18 at 18:28
-
How can you make a task wait for another task? I cannot find any setting in Task Scheduler that allows this. – LPChip Oct 17 '20 at 06:56
-
@LPChip: The Task Scheduler is not well-adapted for it. The second task could be started by the first one, and wait upon some object. I can think of a dummy window started by the first task with a known title, which AutoHotkey can track. Or perhaps a file created/deleted when the first task finishes, where the second task loops on checking its existence (which does not require AutoHotkey). – harrymc Oct 17 '20 at 07:59
-
Right... so its not an option in TaskScheduler itself... That's why I couldn't find it. If programming is going to be the way anyway, I'll either stick to the workstation lock/unlock (both supported by task scheduler, or program something in Visual Studio Core, which will give me far more control anyway, such as: if inactive for 5 minutes... if inactive for 15 minutes... when active... if cpu usage is below... etc... – LPChip Oct 17 '20 at 10:38