Create and manage Windows Task Scheduler jobs from the command line using schtasks.exe

domain: learn.microsoft.com · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Create a daily task: schtasks /Create /TN "MyDailyJob" /TR "C:\Scripts\myjob.bat" /SC DAILY /ST 03:00
  2. Create a task that runs at logon for a specific user: schtasks /Create /TN "OnLogon" /TR "C:\Scripts\startup.bat" /SC ONLOGON /RU <DOMAIN\USERNAME>
  3. List all tasks: schtasks /Query /FO LIST /V — use /FO CSV for machine-readable output.
  4. Run a task immediately: schtasks /Run /TN "MyDailyJob"
  5. Delete a task: schtasks /Delete /TN "MyDailyJob" /F

Known gotchas

Related routes

Define complex Windows Task Scheduler triggers by exporting/editing/importing a task's full XML definition instead of using simple schtasks flags
learn.microsoft.com · 5 steps · unrated
create and manage Windows scheduled tasks entirely through the PowerShell ScheduledTasks module cmdlets
learn.microsoft.com · 5 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans