How to create scheduled tasks with Command Prompt on Windows 10

Windows 10 ships with Task Scheduler, which is an advanced tool that allows you to create and run routines automatically. Using this tool, you can automate tasks to perform all sorts of things, including launching an app, running a specific command, or executing a script at a specified day and time, or when a particular condition is met using triggers.

Although there's a graphical experience to use Task Scheduler, you can also use Command Prompt to create, edit, and delete tasks, which can come in handy in many situations. For instance, when you need to speed up the process to create the same task on multiple computers, and when building an application or script that needs to connect with the tool — just to name a few.

In this Windows 10 guide, we'll walk you through the steps to get started managing scheduled tasks using the schtasks.exe tool on Command Prompt.

How to create a scheduled task using Command Prompt

To create a scheduled task with Command Prompt on Windows 10, use these steps:

  1. Open Start.
  2. Search for Command Prompt, right-click the top result, and select the Run as administrator option.
  3. Type the following command to create a daily task to run an app at 11:00am and press Enter:SyntaxSCHTASKS /CREATE /SC DAILY /TN "FOLDERPATH\TASKNAME" /TR "C:\SOURCE\FOLDER\APP-OR-SCRIPT" /ST HH:MMExampleSCHTASKS /CREATE /SC DAILY /TN "MyTasks\Notepad task" /TR "C:\Windows\System32\notepad.exe" /ST 11:00Quick tip: The folder path before the task name, under the /TN option, is not a requirement, but it'll help you to keep your tasks separate. If you don't specify a path, the task will be created inside the Task Scheduler Library folder.

  1. Type the following command to create a weekly task to run an app at 11:00am and press Enter:SyntaxSCHTASKS /CREATE /SC WEEKLY /D SUN /TN "FOLDERPATH\TASKNAME" /TR "C:\SOURCE\FOLDER\APP-OR-SCRIPT" /ST HH:MMExampleSCHTASKS /CREATE /SC WEEKLY /D SUN /TN "MyTasks\Notepad task" /TR "C:\Windows\System32\notepad.exe" /ST 11:00

  1. Type the following command to create a monthly task to run an app at 11:00am and press Enter:SyntaxSCHTASKS /CREATE /SC MONTHLY /D 15 /TN "FOLDERPATH\TASKNAME" /TR "C:\SOURCE\FOLDER\APP-OR-SCRIPT" /ST HH:MMExampleSCHTASKS /CREATE /SC MONTHLY /D 15 /TN "MyTasks\Notepad task" /TR "C:\Windows\System32\notepad.exe" /ST 11:00

  1. Type the following command to create a scheduled task that runs daily as a specific user and press Enter:SyntaxSCHTASKS /CREATE /SC DAILY /TN "FOLDERPATH\TASKNAME" /TR "C:\SOURCE\FOLDER\APP-OR-SCRIPT" /ST HH:MM /RU USER-ACCOUNTExampleSCHTASKS /CREATE /SC DAILY /TN "MyTasks\Notepad task" /TR "C:\Windows\System32\notepad.exe" /ST 11:00 /RU admin

Once you complete the steps, the task will run during the intervals you specified.

Task Scheduler create options

The command line version of Task Scheduler ships with many options allowing to customize many aspects of a task, and in this guide, we are using the following options to change a scheduled task:

  • /CREATE — specifies that you want to create a new an automated routine.
  • /SC — defines the schedule for the task. Options available, include MINUTE, HOURLY, DAILY, WEEKLY, MONTHLY, ONCE, ONSTART, ONLOGON, ONIDLE, and ONEVENT.
  • /D — specifies the day of the week to execute the task. Options available, include MON, TUE, WED, THU, FRI, SAT, and SUN. If you're using the MONTHLY option, then you can use 1 - 31 for the days of the month. Also, there's the wildcard "*" that specifies all days.
  • /TN — specifies the task name and location. The "MyTasks\Notepad task" uses the "Notepad task" as the name and stores the task in the "MyTasks" folder. If the folder isn't available, it'll be created automatically.
  • /TR — specifies the location and the name of the task that you want to run. You can select an app or custom script.
  • /ST — defines the time to run the task (in 24 hours format).
  • /QUERY — displays all the system tasks.
  • /RU — specifies the task to run under a specific user account.

These are just some of the available options. You can learn more about the options to create a scheduled task running the

SCHTASKS /CREATE /?

command.

How to change a scheduled task using Command Prompt

To modify a scheduled task on Windows 10 with Command Prompt, use these steps:

  1. Open Start.
  2. Search for Command Prompt, right-click the top result, and select the Run as administrator option.
  3. Type the following command to change the time to run the task 9:00am and press Enter:SyntaxSCHTASKS /CHANGE /TN "FOLDERPATH\TASKNAME" /ST HH:MMExampleSCHTASKS /CHANGE /TN "MyTasks\Notepad task" /ST 09:00

  1. Type the following command to change the task user information and press Enter:SyntaxSCHTASKS /CHANGE /TN "FOLDERPATH\TASKNAME" /RU NEW-USERNAMEExampleSCHTASKS /CHANGE /TN "MyTasks\Notepad task" /RU admin2

  1. Type the following command to disable a scheduled task and press Enter:SyntaxSCHTASKS /CHANGE /TN "FOLDERPATH\TASKNAME" /DISABLEExampleSCHTASKS /CHANGE /TN "MyTasks\Notepad task" /DISABLEQuick tip: If you want to re-enable the task, you can use the same command, but make sure to use the /ENABLE option instead.

After completing the steps, the task will be modified with the information that you've specified.

Task Scheduler change options

In this guide, we are using the following options to create a scheduled task:

  • /CHANGE — specifies that you want to edit an existing task.
  • /TN — specifies the name and location of the task that you want to modify.
  • /ST — defines the new time to run the automated routine.
  • /DISABLE — disables the task.

These are just some of the available options. You can learn more about the options to change a scheduled task running the

SCHTASKS /CHANGE /?

command.

How to delete a scheduled task using Command Prompt

If you no longer need a particular task, you can delete it using these steps:

  1. Open Start.
  2. Search for Command Prompt, right-click the top result, and select the Run as administrator option.
  3. Type the following command to delete a scheduled task and press Enter:SyntaxSchTask /DELETE /TX "FOLDERPATH\TASKNAME"ExampleSCHTASKS /DELETE /TN "MyTasks\Notepad task"

  1. Press the Y key to confirm.

Once you complete the steps, the task will be removed, and it'll no longer be available on your device.

Task Scheduler delete options

In this guide, we are using the following options to delete a scheduled task:

  • /DELETE — specifies that you want to delete an existing task.
  • /TN — specifies the name and location of the task that you want to delete.

We're focusing this guide on Windows 10, but the ability to use Task Scheduler with Command Prompt has been around for a long time, which means that you can also use these steps on Windows 8.1 and Windows 7.

Mauro Huculak

Mauro Huculak has been a Windows How-To Expert contributor for WindowsCentral.com for nearly a decade and has over 15 years of experience writing comprehensive guides. He also has an IT background and has achieved different professional certifications from Microsoft, Cisco, VMware, and CompTIA. He has been recognized as a Microsoft MVP for many years.

Read more
Windows 11 set shutdown time
How to shut your PC down at a specific time on Windows 11 and 10
Open Command Prompt on Windows 10
How to launch Command Prompt (standard and admin) on Windows 10
Windows 11 powercfg commands
How to use powercfg to control power settings on Windows 10 and 11
Command Prompt commands
20 Essential commands every user should know on Command Prompt for Windows 11
Windows 10 rename multiple files
How to batch rename multiple files on Windows 10
PowerShell basic commands
15 Essential PowerShell commands every Windows 11 user should know
Latest in Windows 10
Windows 10 Find My Device
How to enable Find My Device on Windows 10 to recover your PC if it's ever lost or stolen
Outlook Client Hero
Microsoft just made Windows 10 worse, and there's (almost) nothing you can do about it
Windows 10 Start menu on HP ZBook Studio G4
Microsoft will retroactively downgrade this part of Windows 10 next month
Former Microsoft Executive Vice President Terry Myerson stands in front of a presentation about Windows 10
Microsoft addresses the 'elephant in the room,' discusses upcoming end of Windows 10 support
Surface Hub 2S
Windows 10 for PCs is not the only version of Windows to reach end of support this year
Windows Insider program settings
Microsoft shuts down the Windows 10 Beta Channel just five months after reopening it
Latest in How-to
Atomfall
Can I play Atomfall on Steam Deck, ROG Ally, and other gaming handhelds?
The First Berserker: Khazan
Is The First Berserker: Khazan on Xbox Game Pass?
Clair Obscur: Expedition 33
Is Clair Obscur: Expedition 33 on Xbox Game Pass?
A close-up of Hazel in South of Midnight
Is South of Midnight on Xbox Game Pass?
Atomfall screenshot
Atomfall: How to grab the best melee weapon and melee perk right away
Atomfall District B
Atomfall: How to open District B, get inside the Robot Facility, and grab the Signal Redirector