When creating a task with a batch file or command line, how do I specify the following option?
Run task as soon as possible after a scheduled start is missed
I know that this option exists via the GUI, but I need to specify it via command line.
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.Sign up to join this community
Powershell to rescue, use -StartWhenAvailable
Set-ScheduledTask ` -TaskName $TaskName ` -TaskPath $TaskPath ` -Trigger $(New-ScheduledTaskTrigger -At "01.01.2018 05:00:00" -DaysOfWeek $day -Weekly -Verbose) ` -Settings $(New-ScheduledTaskSettingsSet -StartWhenAvailable -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries)