Published October 21, 2026
Windows Task Scheduler Task Not Running? Why It Didn't Fire
A task is five pieces: triggers, actions, conditions, settings, and the account it runs as. "Not running" is one of three things. The trigger never fired. The trigger fired and Task Scheduler blocked the start. Or the action started and returned a non-zero Last Run Result.
A Linux host with a five-field line that never starts is crontab not running. A Windows PC has no crontab. The same silence from a systemd timer is systemd timer not running. The short copy-paste for a ping is Windows Task Scheduler.
How Task Scheduler decides to run
A trigger is the reason to start. A daily or weekly trigger is a clock time. New-ScheduledTaskTrigger -Daily -At 3am and -Weekly are those. schtasks /Create /SC DAILY and /SC WEEKLY are the same schedules. /ST is the time, in 24-hour HH:mm. At startup is -AtStartup and /SC ONSTART. At logon is -AtLogOn and /SC ONLOGON. On idle is /SC ONIDLE. On an event is /SC ONEVENT. Event 108 in the operational log is an event trigger. Event 118 is startup. Event 119 is logon.
The task has an Enabled flag, and each trigger has its own. A disabled trigger does not start the task. SCHED_S_TASK_NO_VALID_TRIGGERS (0x41307) means the task has no triggers, or the triggers it has are disabled or unset.
A trigger can expire. The end boundary is the last time it may start. Event 128 says the current time is past that end. SCHED_E_PAST_END_BOUNDARY (0x8004131E) is the same refusal. SCHED_S_TASK_NO_MORE_RUNS (0x41304) means nothing further is scheduled.
Delay and repeat are different knobs. On a daily or weekly trigger, -RandomDelay is a random delay from zero up to the span you set. schtasks /DELAY is a fixed wait, and it applies only to ONSTART, ONLOGON, and ONEVENT, in mmmm:ss. Repeat is an interval plus a duration: the task runs, waits, and runs again until the duration ends. schtasks uses /RI for the interval and /DU for the duration. /K stops the task when that duration ends. In PowerShell, -RepetitionInterval and -RepetitionDuration are on the -Once trigger.
With no time zone on the trigger's start boundary, the clock time is local time on that computer. The trigger checkbox "Synchronize across time zones" stores a zoned boundary. New-ScheduledTaskTrigger writes that boundary in UTC with a Z suffix, which turns the checkbox on. With the checkbox off, 03:00 stays 03:00 on that PC. With it on, the trigger is a fixed instant, so the local hour moves when the PC's offset changes. The skipped hour and the repeated hour are cron jobs and daylight saving time.
Check the boundary before you trust the next run time. The working example below clears the Z so the daily time stays local.
Why a task does not run
Work down this list. Each item is a different check.
Last Run Result
Last Run Result is the code from the last run. The Task Scheduler GUI prints it in hex. schtasks /Query /V prints the same value as a decimal. 0x41303 is 267011. Get-ScheduledTaskInfo calls the field LastTaskResult.
0x0 is a successful finish. Win32 error 0 is ERROR_SUCCESS, "The operation completed successfully."
0x1 is the action process's own exit code 1. Win32 error 1 is ERROR_INVALID_FUNCTION, "Incorrect function." A script that exit 1 produces this result. A missing program is a different code, below.
These Task Scheduler success constants describe the task:
0x41300(267008),SCHED_S_TASK_READY. The task is ready to run at its next scheduled time. The status Ready is this state.0x41301(267009),SCHED_S_TASK_RUNNING. The task is currently running. Last Run Result stays here until that run finishes. A hang looks like a task that stopped. The process and a bound on how long it may run are cron job stuck or hanging.0x41303(267011),SCHED_S_TASK_HAS_NOT_RUN. The task has not yet run.schtasksalso shows Last Run Time11/30/1999 12:00:00 AMfor that case. That date is the empty value, not an execution.0x41306(267014),SCHED_S_TASK_TERMINATED. The last run was terminated by the user.
0x80041326 is SCHED_E_TASK_DISABLED: the task is disabled. 0x41302 is the matching success constant, SCHED_S_TASK_DISABLED: the task will not run at the scheduled times because it has been disabled.
A code that starts with 0x8007 is a Win32 error packed into an HRESULT. The last four hex digits are the Win32 code. net helpmsg followed by that number prints the text.
0x80070002is Win32 error 2,ERROR_FILE_NOT_FOUND: "The system cannot find the file specified."0x8007010Bis Win32 error 267,ERROR_DIRECTORY: "The directory name is invalid."schtasksprints this as2147942667.0x800710E0is Win32 error 4320,ERROR_REQUEST_REFUSED: "The operator or administrator has refused the request." Task Scheduler returns it when it refuses the launch. The operational event says which constraint refused it. Event 322 is an instance that is already running. Event 326 is battery power.
0x80041320 is SCHED_E_USER_NOT_LOGGED_ON: the task will not run because the user is not logged on. 0x80041315 is SCHED_E_SERVICE_NOT_RUNNING: the Task Scheduler service is not running. 0x0004131C is SCHED_S_BATCH_LOGON_PROBLEM: the task is registered, but it may fail to start because the principal needs the batch logon right.
Start in is empty, or the path is quoted in the wrong box
New-ScheduledTaskAction -WorkingDirectory is the "Start in (optional)" box. If you leave it empty, Task Scheduler runs the task in %windir%\System32, which is C:\Windows\System32. schtasks /TR does the same with a relative program name: a path you omit is assumed to be in System32. A script named backup.ps1 is then looked up there, and Last Run Result is 0x80070002.
Start in is a directory path. Leave the quotes off. A quoted value is not a valid directory name, and the result is 0x8007010B. Program/script is a command. A path with spaces is quoted there.
Program/script: "C:\Program Files\Backup\backup.exe"
Add arguments: /full
Start in: C:\Program Files\Backup
A .bat or a .ps1 is the program
Register-ScheduledTask can run an .exe, a .bat, or a .cmd. A batch file can be the program. cmd.exe /c "C:\Scripts\backup.bat" is the explicit form, and it is the one to use when you want the shell's exit code.
A .ps1 set as Program/script uses the file association. On a default Windows install that association opens the file. Point Program/script at powershell.exe, and pass the script with -File:
Program/script: powershell.exe
Add arguments: -NoProfile -ExecutionPolicy Bypass -File "C:\Scripts\backup.ps1"
Start in: C:\Scripts
-NoProfile skips the profile scripts. -ExecutionPolicy Bypass applies to that process. -File runs the script and then exits. Get-ExecutionPolicy -List shows the policies that apply. A Restricted policy does not run scripts. Windows PowerShell defaults to Restricted on Windows clients and RemoteSigned on Windows Server. The Group Policy setting Turn on Script Execution overrides both. PowerShell 7 is pwsh.exe, and it keeps its own policy.
A drive letter mapped in an interactive logon is not there when the task runs in a non-interactive session. Use a UNC path, \\server\share\backup.ps1. The account's environment is the one the task engine loaded when it started. A variable you set later in a profile is a different problem, the same class of miss as cron job environment variables.
The account
"Run only when user is logged on" uses an interactive token. The task runs only in a session that user already has. Event 332 says the user was not logged on when the launch conditions were met. schtasks /IT is that option. /IT has no effect on a System task.
"Run whether user is logged on or not" stores the password and runs in a non-interactive session. There is no interactive desktop, so a script that waits on a window sits there. The checkbox "Do not store password" is schtasks /NP and logon type S4U. No password is stored. The task can use local resources. It has no access to the network or to encrypted files.
A password or S4U task starts only if that account has the "Log on as a batch job" user right. Administrators and Backup Operators have it by default. 0x0004131C is the registration warning when the right is missing. Local Security Policy, User Rights Assignment, is where the right is granted.
The password saved on the task is the one you entered when you saved it. After that password changes, the logon fails until you save the task again with the current password. Event 104 says Task Scheduler failed to log on and tells you to check the credentials.
NT AUTHORITY\SYSTEM is a service account. Register-ScheduledTask -User ignores the password for NT AUTHORITY\SYSTEM, NT AUTHORITY\LOCALSERVICE, and NT AUTHORITY\NETWORKSERVICE. The task runs whether anyone is logged on. Local System is a powerful local account. It does not have a person's mapped drives or that person's profile. On the network it is the computer account. A domain service account, with its password stored, is the account that can reach a share as that user. That account still needs the batch logon right.
Conditions
The task starts only when every condition is true. The defaults below are the task schema. A new task picks them up.
- "Start the task only if the computer is on AC power" is on. The schema name is
DisallowStartIfOnBatteries, default true. Event 326 says the computer is running on batteries.-AllowStartIfOnBatteriesclears the block. - "Stop if the computer switches to battery power" is on.
StopIfGoingOnBatteriesdefaults to true. Event 327 is that stop.-DontStopIfGoingOnBatteriesleaves the task running. - Idle is
-RunOnlyIfIdle. Event 117 is a launch on idle. Event 328 stops the task because the computer is no longer idle. - "Wake the computer to run this task" is
-WakeToRun. Event 145 says Task Scheduler woke the computer. A shut-down computer stays off. Wake applies to a machine that is asleep and can wake. - "Start only if the following network connection is available" is
-RunOnlyIfNetworkAvailable. Event 112 says the network was unavailable.
Settings
- "Run task as soon as possible after a scheduled start is missed" is
-StartWhenAvailable. The schema default is false. With it off, a start that passed while the computer was unavailable is missed. With it on, Task Scheduler starts that task when the computer is available again. Event 114 is that catch-up start. One start, for the missed schedule. - "If the task is already running, then the following rule applies" defaults to "Do not start a new instance." The schema name is
MultipleInstancesPolicy, defaultIgnoreNew. Event 322 says the new launch was skipped because an instance is already running.-MultipleInstancesacceptsIgnoreNew,Parallel, andQueue.Parallelstarts another instance immediately.Queuestarts it when the current one finishes. Refusing the second start on purpose is prevent overlapping cron jobs. - "Stop the task if it runs longer than" defaults to three days. The task settings object stops a task 72 hours after it starts unless you change
ExecutionTimeLimit. Event 111 says the task was terminated because it exceeded that time. - "Allow task to be run on demand" defaults to on (
AllowStartOnDemand).-DisallowDemandStartturns it off.SCHED_E_START_ON_DEMAND(0x80041328) means the settings do not allow an on-demand start, so the Run command andStart-ScheduledTaskare refused. - "If the task fails, restart every" is
-RestartCountand-RestartInterval. The schema omits restart-on-failure unless you set it, so a failed task does not retry on its own.
The computer, the service, and a disabled task
A powered-off computer does not run the task and does not wake. Asleep is the wake setting above, plus the catch-up setting if the start was missed. NumberOfMissedRuns counts schedules the task missed because the computer was unavailable, powered off included. It does not count actions that started and failed.
A disabled task or a disabled trigger never reaches the action. Get-ScheduledTask shows State as Disabled. 0x80041326 is that error.
The Task Scheduler service has to be running. Get-Service Schedule is that service. Its display name is Task Scheduler. 0x80041315 means it is not running. If every task on the machine stops at once, that service is the first check.
Inspect it
schtasks /Query /TN "\Backup\Nightly" /V /FO LIST
/V adds the advanced properties. /FO LIST prints one field per line.
- Last Run Time. When it last ran.
11/30/1999 12:00:00 AMmeans it has not run. - Last Result. The code from that run, as a decimal.
0is success.267011is0x41303, which means it has not yet run. - Next Run Time. The next scheduled start.
N/Ameans nothing further is scheduled. - Status.
Readycan run at the next time.Runningis in progress. - Run As User. The account.
- Start In. The working directory. Empty means
%windir%\System32. - Scheduled Task State.
EnabledorDisabled. - Task To Run. The program
schtaskswill start. - Logon Mode.
Interactive onlyis/IT: the run-as user has to be logged on.
Get-ScheduledTask -TaskPath "\Backup\" -TaskName "Nightly"
Get-ScheduledTaskInfo -TaskPath "\Backup\" -TaskName "Nightly" |
Select-Object LastRunTime, LastTaskResult, NextRunTime, NumberOfMissedRuns
Start-ScheduledTask -TaskPath "\Backup\" -TaskName "Nightly"
Get-ScheduledTask is the definition, including State: Ready, Running, Queued, or Disabled. Get-ScheduledTaskInfo is the runtime: LastRunTime, LastTaskResult, NextRunTime, and NumberOfMissedRuns. Start-ScheduledTask runs it once. A success there means the action can start. It does not mean the trigger will fire. If on-demand start is off, the error is 0x80041328.
The History tab reads "History (disabled)" while the operational log is off. Select Task Scheduler (Local), then click Enable All Tasks History in the Actions pane. The same events are in Microsoft-Windows-TaskScheduler/Operational:
Get-WinEvent -FilterHashtable @{
LogName = "Microsoft-Windows-TaskScheduler/Operational"
StartTime = (Get-Date).AddDays(-1)
} | Where-Object { $_.Message -like "*\Backup\Nightly*" }
The messages below are the operational events for this log:
- 100. Task Scheduler started the instance of the task.
- 101. It failed to start the task. The event includes an error value.
- 102. It successfully finished the instance.
- 103. It failed to start the instance. The event includes an error value.
- 104. It failed to log on. Check the credentials.
- 111. It terminated the instance because the run exceeded the configured time.
- 114. The scheduled start was missed, and the task is starting now because start-when-available is set.
- 128. It did not launch the task because the current time is past the end boundary.
- 129. It launched the instance and records the process id.
- 200. It launched the action.
- 201. It successfully completed the action.
- 203. It failed to launch the action. The event includes an error value.
- 322. It did not launch the task because an instance is already running.
- 326. It did not launch the task because the computer is on battery power.
- 332. It did not launch the task because the user was not logged on.
A 100 followed by a 200 means the action started. A 102 and a 201 mean that action finished successfully. A task with none of these events never left the trigger.
A task that runs
This registers a daily task at 03:00 local time. The action is Windows PowerShell, with an explicit working directory. The principal is NT AUTHORITY\SYSTEM, so the task runs whether anyone is logged on, and no password is stored. The settings catch up after a missed start, allow battery, and stop the task after one hour. IgnoreNew is the default multiple-instance policy, written out here so the choice is visible.
$action = New-ScheduledTaskAction `
-Execute "powershell.exe" `
-Argument '-NoProfile -ExecutionPolicy Bypass -File "C:\Scripts\backup.ps1"' `
-WorkingDirectory "C:\Scripts"
$trigger = New-ScheduledTaskTrigger -Daily -At 3am
$trigger.StartBoundary = (Get-Date).Date.AddHours(3).ToString("yyyy-MM-ddTHH:mm:ss")
$settings = New-ScheduledTaskSettingsSet `
-StartWhenAvailable `
-ExecutionTimeLimit (New-TimeSpan -Hours 1) `
-AllowStartIfOnBatteries `
-DontStopIfGoingOnBatteries `
-MultipleInstances IgnoreNew
Register-ScheduledTask `
-TaskName "Nightly" `
-TaskPath "\Backup\" `
-Action $action `
-Trigger $trigger `
-Settings $settings `
-User "NT AUTHORITY\SYSTEM" `
-RunLevel Highest `
-Force
New-ScheduledTaskTrigger stores StartBoundary with a Z suffix. The line that replaces it writes today's local 03:00 with no zone, which leaves "Synchronize across time zones" off. -User "NT AUTHORITY\SYSTEM" needs no -Password. The same command with -User "DOMAIN\svc-backup" -Password $password stores that account's password and runs whether that user is logged on. That account needs "Log on as a batch job", and a later password change means saving the task again.
schtasks can create the daily System task. It has no working-directory parameter, and this command does not set the catch-up, the battery flags, or the one-hour limit. A relative name in /TR is looked up in System32. /RP is omitted because System has no password.
schtasks /Create /TN "\Backup\Nightly" /SC DAILY /ST 03:00 /RU SYSTEM /RL HIGHEST /F /TR "powershell.exe -NoProfile -ExecutionPolicy Bypass -File C:\Scripts\backup.ps1"
Run it once with Start-ScheduledTask, then read LastTaskResult. 0 means the script's process exited 0.
Monitor it with CronNudge
One check for this task. The success ping is the last step of the script, and only after the work succeeded. CronNudge accepts GET, POST, and HEAD. A 200 body is ok.
Windows includes curl.exe. Windows 10 version 1803 and later include it, and so do Windows Server 2019 and later. Windows Server 2016 does not. Call curl.exe. Windows PowerShell 5.1 aliases curl to Invoke-WebRequest. PowerShell 7 does not define that alias.
?exit= is the query parameter. The value has to be an integer from 0 through 255. On the success URL, 0 stays a success and any other value in that range is a failure. A missing value, or a value outside that range, is ignored, and the success URL then stays a success. /fail is a failure on its own. The script below exits with the work's code after the ping, so Last Run Result stays that code even when curl.exe itself fails. A failed ping then shows up as a missed check, because no success request arrived.
$ErrorActionPreference = "Stop"
$code = 0
try {
& "C:\Scripts\tools\backup.exe"
if ($LASTEXITCODE -ne 0) { $code = $LASTEXITCODE }
} catch {
if ($code -eq 0) { $code = 1 }
}
$ping = "https://cronnudge.com/ping/<your-check-id>"
if ($code -eq 0) {
& "$env:SystemRoot\System32\curl.exe" -fsS -m 10 --retry 3 $ping
} elseif ($code -ge 1 -and $code -le 255) {
& "$env:SystemRoot\System32\curl.exe" -fsS -m 10 --retry 3 "${ping}?exit=$code"
} else {
& "$env:SystemRoot\System32\curl.exe" -fsS -m 10 --retry 3 "$ping/fail"
}
exit $code
-f fails on an HTTP error, -m 10 stops at 10 seconds, and --retry 3 retries transport failures. On Windows Server 2016, or from PowerShell without curl.exe, use Invoke-WebRequest. Windows PowerShell 5.1 needs -UseBasicParsing. PowerShell 6 and later still accept the switch, and it has no effect.
The braces in ${ping}?exit= matter. PowerShell allows ? in a variable name, so $ping?exit is a different, empty variable.
Invoke-WebRequest -UseBasicParsing -TimeoutSec 10 -Uri "${ping}?exit=$code" | Out-Null
Create the check on the same clock time as the trigger, in the PC's time zone. A daily 03:00 local trigger is the cron expression 0 3 * * * in that zone. Paste it into the cron tool and read the next runs. The tool reads cron expressions.
Grace is added to the next scheduled time after a success ping. The form offers none, 1 minute, 5 minutes, 15 minutes, and 1 hour. Five minutes is the default. The API accepts any whole number of seconds from 0 through 7 days. The trigger can wait out its delay, and the script still has to finish, before the ping. With no delay and a short script, 5 minutes covers that. A delay of several minutes needs 15 minutes. A script that can run most of an hour needs 1 hour, and on a daily schedule that alert is still the same morning. On a task that repeats faster than the grace, a ping from the next slot can arrive before the deadline, and the missed slot never alerts.
The form's period list starts at 5 minutes, and a cron expression is rejected when its shortest gap is under the plan minimum. Free's minimum is 5 minutes. A daily task fits Free. A task every minute does not. Pro's minimum is 1 minute. The numbers are on pricing.
/start is optional, for a run you also want timed. Ping /start before the work and the bare URL after it, and turn on run tracking. Setting Max runtime turns run tracking on. Max runtime is 1 second through 7 days. Free includes assertions and run tracking on 3 checks. Pro removes that cap. The fields are in assertions, runs, and agents. A task that stays on 0x41301 and never sends the finish ping is the stuck-run case on that page.
What the ping means, and what it does not: CronNudge only knows about pings it receives. It cannot see Task Scheduler, the operational log, or a sleeping PC. A success ping means the success request completed. A ?exit= value other than 0, or a /fail request, means the script reported a failure. A task that never starts sends neither, and the check goes late when the deadline passes. A paused check stores the ping and does not alert. A failed ping, or no success ping by the deadline, is a down alert: "No successful ping arrived by the deadline." The next success after that is a recovery: "A successful ping arrived."
Free is 10 checks, a 5-minute minimum interval, email, and one Slack or Discord channel. Pro is $12 a month for 100 checks, a 1-minute minimum, signed webhooks, and the API.
The pattern for any scheduler, including the shell wrappers, is how to monitor cron jobs.
FAQ
Why is my scheduled task not running? The trigger never fired, the trigger fired and a condition or the account blocked the start, or the action started and returned a non-zero Last Run Result. schtasks /Query /TN with /V /FO LIST shows Status, Last Result, Next Run Time, and Start In. The operational log, after Enable All Tasks History, says which of the three it was.
What does Last Run Result 0x1 mean? The action's process exited with code 1. It is that program's own exit code. net helpmsg 1 prints "Incorrect function." A script that exits 1 produces the same result. A missing program is 0x80070002. An invalid Start in directory is 0x8007010B.
Why does my task work when I click Run but not on schedule? Run starts the action once, with the saved account. It does not test the trigger. A task that succeeds from the button and misses its schedule usually has a disabled or expired trigger, a condition that is false at the scheduled time, or the computer was off or asleep while "Run task as soon as possible after a scheduled start is missed" was off. Next Run Time is the schedule. Last Result from the button is only the action.
Why does "Run whether user is logged on or not" break my script? That option runs the task in a non-interactive session, with the password stored on the task. There is no interactive desktop. A drive letter mapped in your logon session is not there. Use a UNC path. "Do not store password" can reach local resources only. The account needs "Log on as a batch job". After a password change, save the task again with the new password.
Does Task Scheduler run missed tasks after the PC was off? Only when "Run task as soon as possible after a scheduled start is missed" is set. That setting is off by default, so a start that passed while the computer was powered off is missed. With it on, Task Scheduler starts the task once when the computer is available again. "Wake the computer to run this task" can resume a sleeping computer. A computer that is shut down stays off.
How do I see Task Scheduler history? Select Task Scheduler (Local) and click Enable All Tasks History. Until you do, the History tab reads "History (disabled)". The log is Microsoft-Windows-TaskScheduler/Operational. Event 100 means the task started, 102 means it finished successfully, 200 and 201 are the action, 322 means a second start was skipped because an instance is already running, and 332 means the user was not logged on.
Read Last Run Result, confirm Next Run Time is a real time, and ping when the script exits 0. Create the check in the PC's time zone, or read 0 3 * * * on the cron tool.