Pcornel
Windows · Task Scheduler

Conditions

Cheat sheet · https://pcornel.dk/topic.php?topic=3025

Back to the Topic

Answer

Task conditions add requirements beyond the trigger, such as only run when idle, on AC power or with a network connection. Unmet conditions are a common reason a task silently does not run.

Remember

  • Conditions like idle, AC power or network can block a run.
  • Unmet conditions skip runs silently.
  • Check them when tasks never start.

First checks

  • Get-ScheduledTask -TaskName <name> | fl * — task definition
  • Get-ScheduledTaskInfo -TaskName <name> — last run time and result
  • schtasks /query /tn <name> /v /fo list — details in CMD
  • Get-WinEvent -LogName Microsoft-Windows-TaskScheduler/Operational -MaxEvents 30 — task history (enable first)

Verify in this order

trigger → conditions checked → task runs or is skipped

Where it usually breaks

First mismatch in definition/configuration → security context → service/task/process creation → runtime state → output/side effect → event/performance evidence; preserve identity/native error/pre-state before mutation.

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=3025

Confirmation

Confirm action

Continue?