Pcornel
Windows · Task Scheduler

Scheduled Task Troubleshooting

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

Back to the Topic

Answer

Troubleshoot scheduled tasks via Last Run Result codes, the Task Scheduler Operational log, the account and 'Run whether user is logged on or not' setting, working directory, conditions and script execution policy.

Remember

  • Last Run Result is a hex code with a meaning.
  • The account and its password matter.
  • History shows each attempt.

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 → logon as account → action → exit code

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=3027

Confirmation

Confirm action

Continue?