Run task as soon as possible if missed
I have a task that acts as an automatic application launcher for my application - task is configured to start Daily, and the action is running a Batch file that launches my application.
My problem is that I need to have the "Run only when user is logged on" checkbox checked (its a requirement for a reason not related but still a requirement that I need to honor). My expectation was that if I check the "Run task as soon as possible after a scheduled start is missed" checkbox, and the user is not logged in to Windows at the time of scheduled launch, the task would run as soon as the user logs in to Windows. It doesn't and doesn't even show an error/warning.
How can I accomplish that?
<Triggers>
<CalendarTrigger>
<StartBoundary>2018-02-16T06:50:00</StartBoundary>
<Enabled>true</Enabled>
<RandomDelay>PT10M</RandomDelay>
<ScheduleByDay>
<DaysInterval>1</DaysInterval>
</ScheduleByDay>
</CalendarTrigger>
</Triggers>
<Principals>
<Principal id="Author">
<UserId>S-1-5-21-1290117209-2401072211-3002027406-16005</UserId>
<LogonType>InteractiveToken</LogonType>
<RunLevel>LeastPrivilege</RunLevel>
</Principal>
</Principals>
<Settings>
<MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>
<DisallowStartIfOnBatteries>false</DisallowStartIfOnBatteries>
<StopIfGoingOnBatteries>false</StopIfGoingOnBatteries>
<AllowHardTerminate>true</AllowHardTerminate>
<StartWhenAvailable>false</StartWhenAvailable>
<RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>
<IdleSettings>
<Duration>PT10M</Duration>
<WaitTimeout>PT1H</WaitTimeout>
<StopOnIdleEnd>true</StopOnIdleEnd>
<RestartOnIdle>false</RestartOnIdle>
</IdleSettings>
<AllowStartOnDemand>true</AllowStartOnDemand>
<Enabled>true</Enabled>
<Hidden>false</Hidden>
<RunOnlyIfIdle>false</RunOnlyIfIdle>
<WakeToRun>true</WakeToRun>
<ExecutionTimeLimit>PT72H</ExecutionTimeLimit>
<Priority>7</Priority>
</Settings>
链接地址: http://www.djcxy.com/p/38950.html
下一篇: 如果错过了,尽快运行任务