Task Scheduler - Task Idle Conditions

Did you try using the On idle Trigger instead? As far as I know the task Idle conditions have been used for this trigger only.

On Idle Trigger

I have created a test task - it is below. It will be executed after 1 minute every time a computer became idle. To test it, I was just locking the Windows screen, using Win + L shortcut. The task has been executed exactly 1 minute after computer was locked.


Test Task.xml:

You can import this task into a task scheduler and test.

<?xml version="1.0" encoding="UTF-16"?>
<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
  <RegistrationInfo>
    <Date>2019-05-12T18:21:43.6698729</Date>
    <Author>nsm</Author>
    <URI>\Test Task</URI>
  </RegistrationInfo>
  <Triggers>
    <IdleTrigger>
      <ExecutionTimeLimit>PT4H</ExecutionTimeLimit>
      <Enabled>true</Enabled>
    </IdleTrigger>
  </Triggers>
  <Principals>
    <Principal id="Author">
      <UserId>S-1-5-18</UserId>
      <RunLevel>HighestAvailable</RunLevel>
    </Principal>
  </Principals>
  <Settings>
    <MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>
    <DisallowStartIfOnBatteries>true</DisallowStartIfOnBatteries>
    <StopIfGoingOnBatteries>true</StopIfGoingOnBatteries>
    <AllowHardTerminate>true</AllowHardTerminate>
    <StartWhenAvailable>false</StartWhenAvailable>
    <RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>
    <IdleSettings>
      <Duration>PT1M</Duration>
      <WaitTimeout>PT1H</WaitTimeout>
      <StopOnIdleEnd>true</StopOnIdleEnd>
      <RestartOnIdle>false</RestartOnIdle>
    </IdleSettings>
    <AllowStartOnDemand>true</AllowStartOnDemand>
    <Enabled>true</Enabled>
    <Hidden>false</Hidden>
    <RunOnlyIfIdle>true</RunOnlyIfIdle>
    <WakeToRun>false</WakeToRun>
    <ExecutionTimeLimit>PT4H</ExecutionTimeLimit>
    <Priority>7</Priority>
  </Settings>
  <Actions Context="Author">
    <Exec>
      <Command>C:\Projects\StackOverflow\cmd\testidletask.cmd</Command>
    </Exec>
  </Actions>
</Task>

testidletask.cmd:

@echo off
for /f "tokens=*" %%i in ('date /T') do set DATE=%%i
for /f "tokens=*" %%a in ('time /T') do set TIME=%%a
echo %DATE% %TIME% >>C:\Projects\StackOverflow\cmd\testidletask.log