How To Use The Schtasks Command In Windows (2026)
Schtasks is a built-in Windows command that creates, changes, runs, stops, lists and deletes scheduled tasks from Command Prompt.
It does the same job as the Task Scheduler app, but you can type it or put it in a script.
This guide covers each schtasks operation Microsoft documents.
Table of Contents
- Schtasks quick answer
- What the schtasks command does
- Permissions you need
- The six schtasks operations
- Create a task with /create
- Schedule types for /sc
- Microsoft’s create examples
- Useful /create options
- List tasks with /query
- Run a task now with /run
- Change a task with /change
- Stop a task with /end
- Delete a task with /delete
- Mistakes to avoid
- Prefer the Task Scheduler app?
- Sources
- More Windows guides
Schtasks quick answer
Open Command Prompt as an administrator and use one of the commands below.
| Goal | Command |
|---|---|
| Create a daily task at 8 AM | schtasks /create /tn MyApp /tr c:\apps\myapp.exe /sc daily /st 08:00 |
| List all tasks | schtasks /query |
| Run a task now | schtasks /run /tn "Security Script" |
| Stop a task’s program | schtasks /end /tn "My Notepad" |
| Change the program a task runs | schtasks /change /tn "Virus Check" /tr C:\VirusCheck2.exe |
| Delete a task | schtasks /delete /tn "Start Mail" |
What the schtasks command does
The Microsoft Learn schtasks page says the tool performs the same operations as Scheduled Tasks in Control Panel, and you can use the two together and interchangeably.
It has six operations: /create, /change, /delete, /end, /query and /run.
Microsoft lists Windows 11 and Windows 10 among the systems it applies to.
Permissions you need
Microsoft says you must be a member of the Administrators group to schedule, view and change all tasks on the local computer.
Only Administrators can schedule tasks, whatever account the task runs as.
- Select Start and type Command Prompt.
- Right-click the result and select Run as administrator.
- Type your schtasks command and press Enter.
The six schtasks operations
| Operation | What it does |
|---|---|
| /create | Schedules a new task |
| /change | Changes the program (/tr), the run-as account (/ru), its password (/rp) or adds /it |
| /delete | Deletes a scheduled task |
| /end | Stops a program that a task started |
| /query | Displays the tasks scheduled on the computer |
| /run | Starts a scheduled task immediately |
Create a task with /create
The schtasks create page lists three required parts: a schedule type with /sc, a task name with /tn and the program to run with /tr.
schtasks /create /sc daily /tn MyApp /tr c:\apps\myapp.exe /st 08:00Use quotation marks around a task name that contains spaces.
Use the full path in /tr, because without one schtasks looks in the System32 folder.
Schedule types for /sc
| Value | When the task runs |
|---|---|
| MINUTE | Every set number of minutes |
| HOURLY | Every set number of hours |
| DAILY | Every set number of days |
| WEEKLY | Every set number of weeks, on chosen days |
| MONTHLY | On chosen days or months |
| ONCE | One time, which needs /st |
| ONSTART | Every time the system starts |
| ONLOGON | When any user signs in |
| ONIDLE | After the system is idle for the minutes in /i |
| ONEVENT | When a matching event log entry appears |
The /mo modifier sets how often the task repeats within its type, for example every 20 minutes or every 2 weeks.
Microsoft’s create examples
| Command | What it does |
|---|---|
schtasks /create /sc minute /mo 20 /tn "Security Script" /tr \\central\data\scripts\sec.vbs | Runs every 20 minutes |
schtasks /create /tn MyApp /tr c:\apps\myapp.exe /sc daily /st 08:00 /ed 31/12/2021 | Runs daily at 8:00 until the end date |
schtasks /create /tn MyApp /tr c:\apps\myapp.exe /sc weekly /mo 2 /d FRI | Runs every other Friday |
schtasks /create /tn MyApp /tr c:\apps\myapp.exe /sc monthly /mo SECOND /d SUN | Runs on the second Sunday of every month |
schtasks /create /tn MyApp /tr c:\apps\myapp.exe /sc monthly /mo lastday /m * | Runs on the last day of every month |
schtasks /create /tn MyApp /tr c:\apps\myapp.exe /sc onstart | Runs at every system start |
schtasks /create /tn MyApp /tr c:\apps\myapp.exe /sc onidle /i 10 | Runs after 10 idle minutes |
Useful /create options
| Option | What it does |
|---|---|
| /st HH:mm | Start time in 24-hour format |
| /sd and /ed | Start and end dates, in the format of your local date setting |
| /ru system | Runs the task as the System account, which has no password |
| /rl HIGHEST | Runs with elevated privileges; the default is LIMITED |
| /it | Runs only when the run-as user is signed in |
| /np | Does not store a password, so the task uses local resources only |
| /z | Deletes the task after its schedule completes |
| /f | Creates the task and suppresses the warning if it already exists |
| /delay mmmm:ss | Waits after the trigger, for ONSTART, ONLOGON and ONEVENT only |
List tasks with /query
The schtasks query page says running it with no other parameters lists all tasks on the system.
schtasks /queryAdd /fo LIST /v for detailed output, which Microsoft suggests for checking a task’s recurrence pattern.
schtasks /query /fo LIST /vUse /tn to ask about one task by its path and name, and note that it does not accept wildcards.
schtasks /query /tn "\Microsoft\Office\Office Subscription Maintenance"
Run a task now with /run
The schtasks run page says /run starts a task immediately and ignores its schedule.
It does not change the schedule or the next scheduled run time.
schtasks /run /tn "Security Script"Microsoft recommends this for testing a task, and says to check SchedLgU.txt in the Windows folder if a task does not run.
Change a task with /change
The schtasks change page says you can change the program, the run-as account, the password and some schedule values, but you cannot rename a task.
schtasks /change /tn "Virus Check" /tr C:\VirusCheck2.exeAdd /ENABLE or /DISABLE to turn a task on or off without deleting it.
The /it property can be added but not removed with /change.
Stop a task with /end
Per the schtasks end page, /end stops only the instances of a program that a scheduled task started.
schtasks /end /tn "My Notepad"To stop any other process, Microsoft points to the taskkill command.
Delete a task with /delete
Microsoft’s schtasks delete page says deleting a task removes only its schedule, so the program stays on disk and a running program is not interrupted.
schtasks /delete /tn "Start Mail"Add /f to skip the confirmation prompt.
Be careful with /tn *, because it deletes every task on the computer, including tasks other users scheduled.
Mistakes to avoid
| Mistake | What Microsoft says |
|---|---|
| Assuming a wrong path or password will be caught | schtasks does not check them, so the task is created but will not run |
| Putting several programs in one task | Each task runs one program, so use a batch file |
| Expecting a run-now option in /create | There is none; use /run or a ONCE task a few minutes ahead |
| Scheduling a ONCE task in the past | It cannot be scheduled in the past on the local computer |
| Using /rp with /ru System | /rp is invalid there, because System has no password |
Prefer the Task Scheduler app?
The command and the app edit the same tasks, so you can mix them.
Our guide to creating a scheduled task in Windows 11 covers the point-and-click version.
For another command-line tool in the same series, see the gpupdate command guide.
Sources
All syntax, parameters, examples and notes come from Microsoft Learn: schtasks, create, query, run, change, end and delete.
More Windows guides
- How To Uninstall ESET From Windows Step By Step (2026)
- How To Uninstall Kaspersky Completely From Windows (2026)
- Local Security Authority Protection Is Off In Windows 11 (2026)
- How To Use Ping And Tracert In Windows 11 (2026)
- How To Change UAC Settings In Windows 11 (2026)
- How To Rip A CD To Your PC In Windows 11 (2026)
See all: Windows 11 Guides