How to create scheduled tasks with Command Prompt on Windows 10
Windows x 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 control, or executing a script at a specified day and time, or when a particular condition is met using triggers.
Although there's a graphical feel to use Chore Scheduler, you can too use Command Prompt to create, edit, and delete tasks, which tin can come in handy in many situations. For example, when you need to speed up the process to create the same chore 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, nosotros'll walk yous through the steps to become started managing scheduled tasks using the schtasks.exe tool on Command Prompt.
- How to create a scheduled task using Command Prompt
- How to alter a scheduled task using Control Prompt
- How to delete a scheduled task using Command Prompt
How to create a scheduled chore using Command Prompt
To create a scheduled chore with Command Prompt on Windows 10, use these steps:
- Open Outset.
- Search for Command Prompt, right-click the summit result, and select the Run as administrator pick.
-
Blazon the post-obit control to create a daily task to run an app at xi:00am and press Enter:
Syntax
SCHTASKS /CREATE /SC DAILY /TN "FOLDERPATH\TASKNAME" /TR "C:\SOURCE\FOLDER\APP-OR-SCRIPT" /ST HH:MM
Example
SCHTASKS /CREATE /SC DAILY /TN "MyTasks\Notepad job" /TR "C:\Windows\System32\notepad.exe" /ST xi:00
Quick tip: The binder path before the task proper name, under the /TN option, is non a requirement, only 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.
-
Blazon the following command to create a weekly task to run an app at eleven:00am and printing Enter:
Syntax
SCHTASKS /CREATE /SC WEEKLY /D Sun /TN "FOLDERPATH\TASKNAME" /TR "C:\SOURCE\FOLDER\APP-OR-SCRIPT" /ST HH:MM
Case
SCHTASKS /CREATE /SC WEEKLY /D SUN /TN "MyTasks\Notepad task" /TR "C:\Windows\System32\notepad.exe" /ST 11:00
-
Blazon the post-obit control to create a monthly chore to run an app at 11:00am and press Enter:
Syntax
SCHTASKS /CREATE /SC MONTHLY /D 15 /TN "FOLDERPATH\TASKNAME" /TR "C:\SOURCE\FOLDER\APP-OR-SCRIPT" /ST HH:MM
Example
SCHTASKS /CREATE /SC MONTHLY /D 15 /TN "MyTasks\Notepad task" /TR "C:\Windows\System32\notepad.exe" /ST 11:00
-
Type the following control to create a scheduled task that runs daily as a specific user and press Enter:
Syntax
SCHTASKS /CREATE /SC DAILY /TN "FOLDERPATH\TASKNAME" /TR "C:\SOURCE\FOLDER\APP-OR-SCRIPT" /ST HH:MM /RU USER-ACCOUNT
Example
SCHTASKS /CREATE /SC DAILY /TN "MyTasks\Notepad task" /TR "C:\Windows\System32\notepad.exe" /ST 11:00 /RU admin
Once you lot complete the steps, the task will run during the intervals you lot specified.
Task Scheduler create options
The control line version of Task Scheduler ships with many options allowing to customize many aspects of a job, 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, One time, ONSTART, ONLOGON, ONIDLE, and ONEVENT.
- /D — specifies the twenty-four hour period of the calendar week to execute the job. Options available, include Mon, TUE, Wed, THU, FRI, Sat, and SUN. If you're using the MONTHLY option, then you tin use 1 - 31 for the days of the month. Besides, there'southward the wildcard "*" that specifies all days.
- /TN — specifies the chore name and location. The "MyTasks\Notepad chore" uses the "Notepad task" as the proper name and stores the chore in the "MyTasks" folder. If the folder isn't available, information technology'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 only some of the available options. You can learn more nearly the options to create a scheduled chore 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:
- Open Start.
- Search for Command Prompt, right-click the top event, and select the Run as administrator option.
-
Type the post-obit command to change the time to run the task ix:00am and printing Enter:
Syntax
SCHTASKS /CHANGE /TN "FOLDERPATH\TASKNAME" /ST HH:MM
Example
SCHTASKS /Change /TN "MyTasks\Notepad task" /ST 09:00
-
Type the following control to modify the task user information and press Enter:
Syntax
SCHTASKS /CHANGE /TN "FOLDERPATH\TASKNAME" /RU NEW-USERNAME
Example
SCHTASKS /Change /TN "MyTasks\Notepad task" /RU admin2
-
Type the following control to disable a scheduled chore and press Enter:
Syntax
SCHTASKS /CHANGE /TN "FOLDERPATH\TASKNAME" /DISABLE
Instance
SCHTASKS /CHANGE /TN "MyTasks\Notepad chore" /DISABLE
Quick tip: If you want to re-enable the task, y'all can apply the same command, just make sure to use the
/ENABLE
choice instead.
Later on completing the steps, the job will be modified with the information that you've specified.
Chore Scheduler change options
In this guide, nosotros are using the post-obit options to create a scheduled task:
- /CHANGE — specifies that you want to edit an existing task.
- /TN — specifies the proper noun and location of the task that you want to modify.
- /ST — defines the new fourth dimension to run the automated routine.
- /DISABLE — disables the job.
These are merely some of the bachelor options. Yous can learn more than about the options to change a scheduled job running the SCHTASKS /Modify /?
command.
How to delete a scheduled task using Command Prompt
If you no longer demand a detail task, you can delete it using these steps:
- Open Start.
- Search for Command Prompt, correct-click the pinnacle result, and select the Run as administrator pick.
-
Blazon the following command to delete a scheduled task and printing Enter:
Syntax
SchTask /DELETE /TX "FOLDERPATH\TASKNAME"
Case
SCHTASKS /DELETE /TN "MyTasks\Notepad task"
-
Press the Y key to confirm.
Once you lot 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, nosotros are using the post-obit options to delete a scheduled chore:
- /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 x, but the ability to use Task Scheduler with Command Prompt has been around for a long time, which ways that you lot can also use these steps on Windows 8.ane and Windows 7.
More Windows x resources
For more helpful articles, coverage, and answers to common questions virtually Windows ten, visit the post-obit resources:
- Windows 10 on Windows Central – All you need to know
- Windows 10 help, tips, and tricks
- Windows ten forums on Windows Primal
Mauro recommends all these affordable accessories
Howdy, I'm Mauro Huculak, Windows Central's aid and how-to guru. I wrote the postal service you're reading now, and I know the Windows OS within and out. But I'm too a bit of a hardware geek. These are some of the affordable gadgets on my desk-bound today.
Logitech MX Master Wireless Mouse ($72 at Amazon)
I know mice, and this is the one I use every day. The MX Primary is a wireless high-precision mouse that'south very comfortable to utilise and has many great features, including the power to connect with multiple devices, an infinite roll wheel, back and forrad buttons, all of which you can customize.
Ktrio Extended Gaming Mouse Pad ($12 at Amazon)
If you lot spend a lot of time typing, your palms and mouse will exit tracks on your desk-bound. My solution was to start using gaming mouse pads, which are big plenty for you to use the keyboard and the mouse comfortably. This is the 1 I use and recommend.
Supernight LED lite strip ($20 at Amazon)
You could merely use a regular light bulb in your office, but if you want to add some ambient lighting with different colors, an RGB LED strip is the manner to get. This one is Mauro-canonical.
We may earn a commission for purchases using our links. Learn more.

Xbox Insiders Update
This huge Xbox 'Quick Resume' update will requite gamers more control
Microsoft is calculation a new feature to Xbox consoles, allowing yous to permanently store upwardly to two games in a Quick Resume land at all times. The characteristic is heading out first to Xbox Insiders in the Alpha testing ring before hitting the general public.
Source: https://www.windowscentral.com/how-create-task-using-task-scheduler-command-prompt
Posted by: gaultgrabusereave1955.blogspot.com
0 Response to "How to create scheduled tasks with Command Prompt on Windows 10"
Post a Comment