logo
Windows 10 Create, Edit and Delete a Scheduled Task Via CMD in Windows 10/11

Create, Edit and Delete a Scheduled Task Via CMD in Windows 10/11

By Jennifer | Last Updated

Task Scheduler is a tool included in Windows 10/11 that allows predefined actions to be performed automatically when certain conditions are met. Using this tool, you can automate a variety of tasks, including starting apps, running specific commands or executing scripts at specified dates and times, or when specific conditions are met using triggers. In this post, we will show you by example how to create, edit and delete a scheduled task via CMD in Windows 10/11 and how the respective tasks appear in the Task Scheduler.

create edit and delete a scheduled task via cmd in windows 10 11

1: Create scheduled tasks

We can use the following options to create a scheduled task.

/Create: Indicates that you want to create a new automatic task.

/SC: Indicates the schedule of the task. The available options include MINUTE, HOURLY, DAILY, WEEKLY, MONTHLY, ONCE, ONSTART, ONLOGON, ONIDLE, and ONEVENT.

/TN: Indicates the name and location of the task that you want to modify.

/TR: Indicates the location and name of the task you want to run. You can choose an application or a custom script.

/ST: Indicates the new time to run the automated routine.

Step 1: Type CMD in the Start menu bar and click Run as administrator.

Step 2: Type the following command to create a daily task to run the apps at 11:00 a.m., then press Enter.

SchTasks /Create /SC DAILY /TN "My Task" /TR "C:RunMe.bat" /ST 11:00

create a new task

The newly created task is displayed in the Task Scheduler as follows.

new task in task scheduler

2: Edit scheduled tasks

/Change: Indicates that you want to edit an existing task.

If you would like to change "My Tasks" to run at 3:00 PM. You can enter the following command.

SchTasks /Change /TN "My Task" /ST 15:00

change task time

The tasks changed in the Task Scheduler are displayed as follows.

modify my task setting

3: Delete scheduled tasks

/Delete: Indicates that you want to delete an existing task.

If you want to delete the newly created task, you can type the following command and press Enter, type Y in the pop-up warning and press Enter, this will successfully delete the task you just created.

SchTasks /Delete /TN "My Task"

delete the task

Related Articles: