How to create an automated task using Task Scheduler on Windows 10
Task Scheduler can automate tasks on Windows 10, and in this guide, I'll show you how.
On Windows 10, the Task Scheduler lets you create and run tasks automatically, and in this guide, I'll outline the steps to complete the process. Typically, the operating system and certain apps use the scheduler to automate maintenance tasks (such as disk defragmentation, disk cleanup, and updates). However, you can use it to automate your own tasks. For example, you can launch programs, run commands, and execute scripts at a specific time or trigger tasks when a specific event occurs.
Task Scheduler monitors the system's time and events to execute the task as soon as the condition is met.
When trying to use the scheduler app to run a task at a specific time or when an event occurs, you can create a task in at least two ways using the basic and advanced settings.
In this how-to guide, I will walk you through the steps to get started with the Task Scheduler experience to automate tasks on your computer.
How to create a basic task on Task Scheduler
To create a task with basic settings on Windows 10, use these steps:
- Open Start.
- Search for Task Scheduler, and click the top result to open the app.
- Right-click the "Task Scheduler Library" branch and select the New Folder option.
- Type a name for the folder – for example, MyTasks. (This step isn't required, but it's recommended to keep your tasks separate from the system and apps tasks.)
- Click the OK button.
- Expand the "Task Scheduler Library" branch and select the MyTasks folder.
- Click the Action menu.
- Select the "Create Basic Task" option.
- In the "Name" setting, type a descriptive name for the task – for example, Notepad Launcher.
- (Optional) In the "Description" setting, create a description for the task.
- Click the Next button.
- Select the Monthly option.
- Quick note: Task Scheduler includes many triggers, including on a specific date, during startup, or when you or a particular user signs in. You'll have to configure additional parameters depending on what you're trying to accomplish. In this case, we'll select the option to run a task every month.
- Click the Next button.
- Using the "Start" settings, specify when the task should run and the time (very important).
- Use the "Monthly" drop-down menu to choose the months of the year you want to run the task.
- Use the "Days" or "On" drop-down menu to specify the days that the task will run.
- Quick tip: Using the "On" setting may be your best option if you plan to run a task during a specific day of the week.
- Click the Next button.
- Select the Start a program option to launch an app, run a command, or execute a script file.
- Quick note: The "Send an e-mail" and "Display a message" options have been deprecated, meaning they may or may not work because Microsoft is no longer maintaining them.
- In the "Program/script" setting, specify the path for the app.
- Quick tip: If you don't know the path of the app, click the "Browse" button to find it.
- (Optional) In the "Add arguments" setting, you can specify arguments to run the task with special instructions.
- (Optional) In the "Start in" setting, specify the folder in which the program will start. (Usually, you can leave this setting empty.)
- Click the Finish button.
Once you complete the steps, Task Scheduler will save the task and run automatically on the specified schedule and event triggers.
How to create an advanced task on Task Scheduler
To create a task using advanced settings on Windows 10, use these steps:
Get the Windows Central Newsletter
All the latest news, reviews, and guides for Windows and Xbox diehards.
- Open Start.
- Search for Task Scheduler, and click the top result to open the app.
- Right-click the "Task Scheduler Library" branch and select the New Folder option.
- Type a name for the folder – for example, MyTasks.
- Click the OK button.
- Expand the "Task Scheduler Library" branch, and select the MyTasks folder.
- Click the Action menu.
- Select the Create Task option.
- In the "Name" setting, type a descriptive name for the task – for example, PowerShell First Script.
- (Optional) In the "Description" setting, create a description for the task.
- In the "Security options" section, configure which administrator account will run the task.
- Quick tip: The default user should be fine if you use an account with administrative privileges. If you want to run a Command Prompt or PowerShell command, select the "Run whether user is logged on or not" option to prevent the command window from showing up when the task runs automatically, as it's likely that using the "Hidden" option won't work.
- (Optional) Check the "Run with highest privileges" option if the task requires elevated privileges.
- The "Configure for" settings should be left alone unless a different compatibility option is required.
- Click the Triggers tab.
- Click the New button.
- Use the "Begin the task" drop-down menu to select one of the many triggers, including "On a schedule," "At startup," "On workstation unlock," and many others. (I'll choose the "On a schedule" option for this guide.)
- Using the "Start" settings, specify when the task should start running and the time (important).
- Select the Monthly option from the left side.
- Use the "Months" drop-down menu to select the months the task will run.
- Use the "Days" or "On" drop-down menu to specify the days that the task will run.
- (Optional) In the "Advanced settings" section, select options to delay, repeat, stop, or expire a task. The "Enabled" option is checked by default. (Typically, you don't want to change these settings unless necessary.)
- Click the OK button.
- Click the Action tab.
- Click the New button.
- Use the "Action" drop-down menu and select the "Start a program" option.
- Under the "Settings" section, in the "Program/script" setting, specify the path for the application – for example, powershell.exe.
- Quick tip: If you don't know the path of the app, click the Browse button to find it. Also, if it's a known application like PowerShell or Command Prompt, you only need to specify the file name.
- (Optional) In the "Add arguments" setting, specify arguments to run the task with special instructions – for example -NoExit -ExecutionPolicy Bypass C:\PATH\TO\SCRIPT\first_script.ps1
The "powershell.exe" command and the above argument will run the script named "first_script.ps1." The argument "-ExecutionPolicy Bypass" ensures that the script runs successfully, and the "-NoExit" argument will prevent the window from closing after running the script. You can learn more about creating a PowerShell script in this guide.
- (Optional) In the "Start in" setting, specify the folder the program will start. (You can always leave this setting empty.)
- Click the OK button.
- Click the Conditions tab.
- (Optional) The "Conditions" tab includes settings that, combined with the "Triggers" settings, will determine when the task should run. (If you're creating a simple task, you don't have to change these settings. However, you want to ensure the "Power" settings are configured to your situation.)
- Click the OK button.
- Click the Settings app.
- (Optional) The "Settings" app includes additional options that will directly affect the behavior of the task. It's not a requirement to change these settings, but it's a good idea to check the following options:
- Run the task as soon as possible after a scheduled start is missed.
- If the task fails, restart every. (Use this option with the default selections.)
- Click the OK button.
After you complete the steps, authenticate with your account credentials, and then the task will run automatically, according to the configurations.
How to run, edit, and delete a task on Task Scheduler
Once you've created the task, you can use these steps to view, edit, delete, or run:
- Open Start.
- Search for Task Scheduler, click the top result to open the experience.
- Expand the Task Scheduler Library branch.
- Select the folder with your tasks.
- To run a task on demand, right-click it and select the Run option.
- To edit a task, right-click it and select the Properties options.
- To delete a task, right-click it and select the Delete option.
You can also view the task information on the page, such as the triggers, when the task runs last, and when it'll run the next time.
Alternatively, you can always select the task and use the "Actions" pane on the right to perform actions, such as run, end quickly, disable, and edit the job.
More resources
For more helpful articles, coverage, and answers to common questions about Windows 10 and Windows 11, visit the following resources:
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.