Pcornel
Browse topics
Options
Recent
Favorites
Automation · Technical reference

Windows Task Scheduler

Direct answer

Windows Task Scheduler runs programs and scripts on schedules or events, configured in taskschd.msc, schtasks or Register-ScheduledTask, with history in the TaskScheduler Operational log.

When to use this

Use this when scheduling automation with Windows Task Scheduler.

First 30 seconds

1. Task Scheduler for Windows jobs.

2. Run as gMSA.

3. Configure "do not start new instance" to avoid overlap.

4. History enabled.

5. Check result codes.

Operational verification

trigger → task → action

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
Windows Task Scheduler automation
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformWindows Task Scheduler automation · Automation implementations are tool and platform specific. Use the adjacent Domain for the technology being automated and this Domain for automation behavior.
Key commandGet-ScheduledTaskInfo -TaskName Backup
Scope / prerequisiteUse this when scheduling automation with Windows Task Scheduler.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

3 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Verification path Verify boundary

The negative fixture should deliberately exercise risks such as DST/timezone drift, duplicate firing, missed triggers, scheduler downtime, dependency race, long-running overlap and successful trigger without successful target work, choosing the cases most relevant to task path/name identity, trigger timezone, principal/logon type, actions/conditions/settings, last result and proving the target action actually succeeded.

Step 2 Example Narrow the fault
$a = New-ScheduledTaskAction -Execute 'pwsh.exe' -Argument '-File C:\Scripts\backup.ps1'
$t = New-ScheduledTaskTrigger -Daily -At 2am
Register-ScheduledTask -TaskName Backup -Action $a -Trigger $t -User 'SYSTEM'
Get-ScheduledTaskInfo -TaskName Backup
Step 3 Common mistakes Narrow the fault
  • Tasks running as a user whose password changes.
  • No logging from the script.
Evidence references

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.

observation · 1
Key points
  • Use taskschd.msc, schtasks or Register-ScheduledTask.
  • Account and conditions decide whether it runs.
  • History is in the TaskScheduler Operational log.
Key checks
  • Get-ScheduledTask -TaskPath \<folder>\ — tasks
  • Get-ScheduledTaskInfo <n> — last run/result
  • schtasks /query /v /fo list /tn <n> — details
ReferenceWhy it matters1 section · depth on demand

What it is

Windows Task Scheduler runs programs and scripts on schedules or events, under a chosen account.

ReferenceImportant terms & boundaries2 sections · depth on demand

In depth

Windows Task Scheduler runs programs and scripts on schedules or triggers (logon, startup, event log entries). It is the native scheduler for Windows automation and can be configured by GUI, schtasks.exe or PowerShell.

$action  = New-ScheduledTaskAction -Execute 'pwsh.exe' -Argument '-NoProfile -File C:\Scripts\backup.ps1'
$trigger = New-ScheduledTaskTrigger -Daily -At 02:30
$set     = New-ScheduledTaskSettingsSet -ExecutionTimeLimit (New-TimeSpan -Hours 1) -StartWhenAvailable
Register-ScheduledTask -TaskName 'Config backup' -Action $action -Trigger $trigger -Settings $set `
  -User 'CORP\svc_backup$' -LogonType Password      # gMSA
Get-ScheduledTaskInfo 'Config backup' | Select-Object LastRunTime, LastTaskResult

LastTaskResult 0 means success. Run tasks as gMSAs or dedicated service accounts, and enable task history for troubleshooting.

Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docWindows Task Scheduler automation current

Authoritative/upstream documentation reviewed for bounded claims in Scheduling > Windows Task Scheduler. 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%
Depth when you need it

Deep reference

Healthy vs suspicious evidence

Output interpretation

For task path/name identity, trigger timezone, principal/logon type, actions/conditions/settings, last result and proving the target action actually succeeded, prefer typed fields and stable IDs over human presentation text.

Confirmation

Confirm action

Continue?