Use this when a scheduled task fails or never runs.
Scheduled Task Troubleshooting
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.
1. LastTaskResult: 0x1 (generic), 0x41301 (running), 0x800710E0 (refused/conditions), 0x8007052E (logon failure).
2. Account password changed or lacks "Log on as batch job"?
3. Path/start-in wrong → run the command manually as that account.
4. Enable history and read the Operational log.
5. Fix and Start-ScheduledTask.
trigger → conditions → logon as account → action → exit code
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Known-good, broken and when it is fixed Verify boundary
Known-good means the intended trigger fires, the task runs under the intended principal, action exit/result is successful, expected output/state is produced and the next schedule remains correct. Broken evidence includes skipped trigger/condition, logon failure, action path/argument error or a nominal scheduler success with missing application result. The limit of what it shows is the task's intended side effect, not merely Last Run Result 0x0.
Step 2 Common mistakes Narrow the fault
- Not checking the task's last run result code.
Step 3 Native failure isolation and next-check logic Narrow the fault
If a task never starts, inspect enabled state, next run time, trigger, conditions and scheduler history. If it starts but fails, record Last Run Result and then inspect the action/script log with the task principal and exact arguments. If manual execution works, reproduce under the scheduled identity and noninteractive environment rather than changing the schedule. For network paths, use explicit UNC/credential context instead of assuming mapped drives exist in the task session.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- Last Run Result is a hex code with a meaning.
- The account and its password matter.
- History shows each attempt.
Get-ScheduledTask -TaskName <name> | fl *— task definitionGet-ScheduledTaskInfo -TaskName <name>— last run time and resultschtasks /query /tn <name> /v /fo list— details in CMDGet-WinEvent -LogName Microsoft-Windows-TaskScheduler/Operational -MaxEvents 30— task history (enable first)
ReferenceHow it works1 section · depth on demand
How it works
Task Scheduler evaluates triggers, conditions, principal/logon type, action path/arguments and execution environment before a task can run. A task can show a successful last start while its script/application internally fails, and an interactive manual run can differ from background execution because working directory, profile, mapped drives, credentials and elevation are different. Task history and the action's own logs are separate evidence sources.
ReferenceImportant terms & boundaries1 section · depth on demand
In depth
Scheduled task troubleshooting:
| Last Run Result | Meaning |
|---|---|
| 0x0 | Success |
| 0x1 | Incorrect function — usually the script/program returned 1 |
| 0x41301 | Task is currently running |
| 0x41303 | Task has not yet run |
| 0x8007010B | Directory name invalid (bad "Start in") |
| 0x80070005 | Access denied |
| 0x800710E0 | Operator refused the request (conditions, e.g. AC power) |
Enable history (Task Scheduler → Enable All Tasks History) or read Microsoft-Windows-TaskScheduler/Operational. Test as the task's account: psexec -s for SYSTEM, or runas for a user.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Task Scheduler → Scheduled Task Troubleshooting. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://learn.microsoft.com/en-us/windows/win32/taskschd/task-scheduler-start-page · confidence 94%