- Creating a Scheduled Task in Windows 10
- Option 1 – From GUI
- Option 2 – From Command Line
- Parameter List:
- You Might Also Like
- How to create an automated task using Task Scheduler on Windows 10
- How to create a basic task using Task Scheduler
- How to create an advanced task using Task Scheduler
- How to run, edit, and delete a task using Task Scheduler
- More Windows 10 resources
- The Dell XPS 15 is our choice for best 15-inch laptop
- Halo: MCC’s live service elements make it better, not worse
- Microsoft’s Surface Duo is not ‘failing up’
- These are the best PC sticks when you’re on the move
Creating a Scheduled Task in Windows 10
If you frequently use certain programs in Microsoft Windows 10 and get tired of opening them after a shutdown or a reboot, you can create scheduled task that runs at boot up.
Option 1 – From GUI
- Using the “Windows Key“ + “R” to open run and type “taskschd.msc“. This will open Task Scheduler.
- Under the actions panel, you can choose to create a back task or create a task. Click “Create Task“.
- The “Create Task” screen will appear. Select the “General” tab
- In the “Name” field, give the task a name. Example: “Outlook Task“.
- In the “Description” field, here you can describe what the task is for and what it will do.
- The last section is the “Security options“, here you can set who can run this task and if the task has admin right.
- Select the “Triggers” tab.
- Select “New…“.
- The “New Trigger” window will appear, here you have the option to set when the task will start.
- Select when you would like the task to start in the “Begin the task” drop-down menu.
- Modify the “Settings” area as desired.
- In the “Advanced settings” field you can choose to delay task, repeat task, stop task, activate and expire.
- “Enabled” is checked by default.
- Select “OK“.
- Select the “Actions” tab, then select “New“.
- The “New Action” window will open.
- In the “Action” drop down, “Start a program” is set by default. Change it if desired.
- Select “Browse…” next to the “Program/script” field
- Browse to the program you are wanting to schedule a task for.
- Select “OK“.
- Go to the “Conditions” tab.
- You can change these if you’d like, but I recommend leaving these settings default.
- Select the “Settings” tab. You can change these if you’d like, but I recommend leaving these alone.
- Select “OK“.
You have successfully setup a scheduled task!
Option 2 – From Command Line
You can add scheduled tasks from the command line if you want to include it in a script using the “schtasks” command along with parameters to tell it when to schedule the task.
For example, if I wanted to run “notepad.exe” every Wednesday at 1:00pm, I could use the following command:
schtasks /create /tn OpenNotepad /tr notepad.exe /sc weekly /d wed /st 13:00:00
SCHTASKS /Create [/S system [/U username [/P [password]]]] [/RU username [/RP password]] /SC schedule [/MO modifier] [/D day] [/M months] [/I idletime] /TN taskname /TR taskrun [/ST starttime] [/RI interval] [ [/K] [/XML xmlfile] [/V1]] [/SD startdate] [/ED enddate] [/IT | /NP] [/Z] [/F] [/HRESULT] [/?]
Parameter List:
- /S system Specifies the remote system to connect to. If omitted the system parameter defaults to the local system.
- /U username Specifies the user context under which SchTasks.exe should execute.
- /P [password] Specifies the password for the given user context. Prompts for input if omitted.
- /RU username Specifies the “run as” user account (user context) under which the task runs. For the system account, valid values are “”, “NT AUTHORITY\SYSTEM” or “SYSTEM”. For v2 tasks, “NT AUTHORITY\LOCALSERVICE” and “NT AUTHORITY\NETWORKSERVICE” are also available as well as the well known SIDs for all three.
- /RP [password] Specifies the password for the “run as” user. To prompt for the password, the value must be either “*” or none. This password is ignored for the system account. Must be combined with either /RU or /XML switch.
- /SC schedule Specifies the schedule frequency. Valid schedule types: MINUTE, HOURLY, DAILY, WEEKLY, MONTHLY, ONCE, ONSTART, ONLOGON, ONIDLE, ONEVENT.
- /MO modifier Refines the schedule type to allow finer control over schedule recurrence. Valid values are listed in the “Modifiers” section below.
- /D days Specifies the day of the week to run the task. Valid values: MON, TUE, WED, THU, FRI, SAT, SUN and for MONTHLY schedules 1 – 31 (days of the month). Wildcard “*” specifies all days.
- /M months Specifies month(s) of the year. Defaults to the first day of the month. Valid values: JAN, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV, DEC. Wildcard “*” specifies all months.
- /I idletime Specifies the amount of idle time to wait before running a scheduled ONIDLE task. Valid range: 1 – 999 minutes.
- /TN taskname Specifies the string in the form of path\name which uniquely identifies this scheduled task.
- /TR taskrun Specifies the path and file name of the program to be run at the scheduled time.
Example: C:\windows\system32\calc.exe - /ST starttime Specifies the start time to run the task. The time format is HH:mm (24 hour time) for example, 14:30 for 2:30 PM. Defaults to current time if /ST is not specified. This option is required with /SC ONCE.
- /RI interval Specifies the repetition interval in minutes. This is not applicable for schedule types: MINUTE, HOURLY, ONSTART, ONLOGON, ONIDLE, ONEVENT. Valid range: 1 – 599940 minutes.If either /ET or /DU is specified, then it defaults to 10 minutes.
- /ET endtime Specifies the end time to run the task. The time format is HH:mm (24 hour time) for example, 14:50 for 2:50 PM. This is not applicable for schedule types: ONSTART, ONLOGON, ONIDLE, ONEVENT.
- /DU duration Specifies the duration to run the task. The time format is HH:mm. This is not applicable with /ET and for schedule types: ONSTART, ONLOGON, ONIDLE, ONEVENT. For /V1 tasks, if /RI is specified, duration defaults to 1 hour.
- /K Terminates the task at the endtime or duration time. This is not applicable for schedule types: ONSTART,
ONLOGON, ONIDLE, ONEVENT. Either /ET or /DU must be specified. - /SD startdate Specifies the first date on which the task runs. The format is mm/dd/yyyy. Defaults to the current
date. This is not applicable for schedule types: ONCE, ONSTART, ONLOGON, ONIDLE, ONEVENT. - /ED enddate Specifies the last date when the task should run. The format is mm/dd/yyyy. This is not applicable for schedule types: ONCE, ONSTART, ONLOGON, ONIDLE, ONEVENT.
- /EC ChannelName Specifies the event channel for OnEvent triggers.
- /IT Enables the task to run interactively only if the /RU user is currently logged on at the time the job runs.
This task runs only if the user is logged in. - /NP No password is stored. The task runs non-interactively as the given user. Only local resources are available.
- /Z Marks the task for deletion after its final run.
- /XML xmlfile Creates a task from the task XML specified in a file. Can be combined with /RU and /RP switches, or with /RP alone, when task XML already contains the principal.
- /V1 Creates a task visible to pre-Vista platforms. Not compatible with /XML.
- /F Forcefully creates the task and suppresses warnings if the specified task already exists.
- /RL level Sets the Run Level for the job. Valid values are LIMITED and HIGHEST. The default is LIMITED.
- /DELAY delaytime Specifies the wait time to delay the running of the task after the trigger is fired. The time format is mmmm:ss. This option is only valid for schedule types ONSTART, ONLOGON, ONEVENT.
- /HRESULT For better diagnosability, the process exit code will be in the HRESULT format.
- /? Displays this help message.
Modifiers: Valid values for the /MO switch per schedule type:
MINUTE: 1 – 1439 minutes.
HOURLY: 1 – 23 hours.
DAILY: 1 – 365 days.
WEEKLY: weeks 1 – 52.
ONCE: No modifiers.
ONSTART: No modifiers.
ONLOGON: No modifiers.
ONIDLE: No modifiers.
MONTHLY: 1 – 12, or
FIRST, SECOND, THIRD, FOURTH, LAST, LASTDAY.
You Might Also Like
Filed Under: Windows Tagged With: Windows 10
How to create an automated task using Task Scheduler on Windows 10
On Windows 10, Task Scheduler is a tool that allows you to create and run virtually any task automatically. Typically, the system and certain apps use the scheduler to automate maintenance tasks (such as disk defragmentation, disk cleanup, and updates), but anyone can use it. With this experience, you can start applications, run commands, and execute scripts at a particular day and time, or you can also trigger tasks when a specific event occurs.
Task Scheduler works by keeping tabs of the time and events on your computer and executes the task as soon as the condition is met.
Whether you’re trying to use the Task Scheduler to run a task at a specific time or when an event occurs, you can create a task in at least two different ways using the basic and advanced settings.
In this Windows 10 guide, we’ll walk you through the steps to get started with the Task Scheduler experience to automate tasks on your device.
How to create a basic task using Task Scheduler
To create a task using basic settings on Windows 10, use these steps:
- Open Start.
- Search for Task Scheduler, and click the top result to open the experience.
Right-click the «Task Scheduler Library» branch, and select the New Folder option.
Select the Create Basic Task option.
In the «Name» field, type a short descriptive name for the task. For example, Notepad Launcher.
Select the Monthly option.
Task Scheduler allows you to select from a number of triggers, including on a specific date, during startup, or when you or a particular user signs in. Depending on your requirements, you’ll need to configure additional parameters. In this case, we’ll be selecting the option to run a task every month.
Use the «Monthly» drop-down menu to the months of the year that 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’re planning to run a task during a specific day of the week.
Select the Start a program option to launch an app, run a command, or execute a script file.
You can select the Send an e-mail or Display a message option, but these are deprecated features, which means that they may or may not work because Microsoft is no longer maintaining them.
- Send an e-mail: Triggers an email notification with a custom message on schedule, but it requires to specify an email server to work.
- Display a message: Allows to display a text message on the screen on schedule.
In the «Program/script» field, specify the path for the application.
Quick Tip: If you don’t know the path of the app, click the Browse button to find it.
Click the Finish button.
Once you’ve completed the steps, the task will be saved, and it’ll run automatically on the schedule you specified.
How to create an advanced task using Task Scheduler
To create a task using advanced settings using the Task Scheduler, use these steps:
- Open Start.
- Search for Task Scheduler, click the top result to open the experience.
Right-click the «Task Scheduler Library» branch, and select the New Folder option.
Select the Create Task option.
In the «Name» field, type a short descriptive name for the task. For example, PowerShell First Script.
In the «Security options» section, you can configure which administrator account can run the task.
Quick Tip: If you’re using an account with administrative privileges, the default user should be fine. If you’re running a Command Prompt or PowerShell command, you can 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.
Use the «Months» drop-down menu to select the months that 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, you can select options to delay, repeat, stop, and expire a task. The Enabled option is checked by default. (Usually, you don’t want to change these settings unless necessary.)
Use the «Action» drop-down menu and select the Start a program option.
You can still use the Send an e-mail or Display a message option, but these are deprecated features, which means that they may or may not work because Microsoft is no longer maintaining them.
Under the «Settings» section, in the «Program/script» field, 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» field, you can specify arguments to run the task with special instructions. For example: -NoExit -ExecutionPolicy Bypass C:\PATH\TO\SCRIPT\first_script.ps1 .
Using the «powershell.exe» command and the above argument, it’ll 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) The «Conditions» tab includes settings that work in combination with the «Triggers» settings to determine when the task should run. (If you’re creating a simple task, you don’t need to modify these settings. However, you want to make sure the Power settings are configured to your requirements.)
(Optional) The «Settings» app include 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.)
After completing the steps, authenticate with your account credentials, and then the task will run automatically on schedule or event using the specified settings.
How to run, edit, and delete a task using Task Scheduler
Once you’ve created the task, you can use these steps to view, exit, or run it on demand:
- 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.
In the page, you’ll also be able to see all your tasks with information, such as the triggers, when the task run 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 quickly perform actions, such as run, end, disable, and edit the job.
While we’re focusing this guide on Windows 10, Task Scheduler has been around for a long time, which means that you can use the same instructions on Windows 8.1, Windows 7, and older versions.
More Windows 10 resources
For more helpful articles, coverage, and answers to common questions about Windows 10, visit the following resources:
The Dell XPS 15 is our choice for best 15-inch laptop
For a lot of people, a 15-inch laptop is a perfect size that offers enough screen for multitasking, and in a lot of cases, some extra performance from powerful hardware. We’ve rounded up the best of the best at this size.
Halo: MCC’s live service elements make it better, not worse
Halo: The Master Chief Collection is more popular than ever, but some fans don’t agree with the live service approach 343 Industries has taken with it. Here’s why those elements are, at the end of the day, great for the game and for Halo overall.
Microsoft’s Surface Duo is not ‘failing up’
Microsoft announced this week that it was expanding Surface Duo availability to nine new commercial markets. While Surface Duo is undoubtedly a work in progress, this is not a sign of a disaster. It’s also doesn’t mean that Surface Duo is selling a ton either. Instead, the reason for the expansion is a lot more straightforward.
These are the best PC sticks when you’re on the move
Instant computer — just add a screen. That’s the general idea behind the ultra-portable PC, but it can be hard to know which one you want. Relax, we have you covered!