How to schedule tasks in Windows 10

vlad_dragomir98@yahoo.com' By: Vlad Dragomir
23 minute read

For various PC problems, we recommend to use this tool.

This tool will repair common computer errors, protect you from file loss, malware, hardware failure and optimize your PC for maximum performance. Quickly fix PC issues and prevent others from happening with this software:

  1. Download this PC Repair Tool with Patended Technologies
  2. Click “Start Scan” to find Windows issues that could be causing PC problems.
  3. Click “Repair All” to fix all issues (requires upgrade).

Task Scheduler is one of the most practical preset Windows applications because it can streamline your work. The main idea of this application is to trigger the running of different scripts and programs at a specific time or a certain event. It has a library where all the tasks loaded are indexed and it organizes them according to the time that must be done and their importance.

The basic system of this application is composed of 2 elements: triggers and actions.

Untitled

The trigger

Types of triggers

The first step of creating a task is to determine what will cause it to run, so the trigger is a set of conditions which when are fulfilled, starts the task. The triggers can be found in the Trigger tab from the Task Properties and the Create Task menu. From the Create Task menu you can create new triggers for your needs.

There are two types of triggers: the time-based trigger and the event-based trigger. The time-based trigger is used for tasks that starts at a certain time or tasks that starts periodically, depending on your schedule. The event-based trigger is used for actions that starts at a specific system event. For example, let’s suppose that in this day you want to recovered a few hours work and you want to have the same productivity, even though you know you will work more than usual. You can set a task to be triggered every time your computer is entering in the idle state.

Note: if a task has multiple triggers, it will be activated when at least one trigger is fulfilled.

Triggers for a schedule

This kind of trigger causes the task to run after a well-determined schedule configured by you. From the trigger settings you can choose if the task will be repeated once, daily, weekly or monthly. This time interval is guided by the computer date and time. You can check the Universal box for making the time interval relative and synchronize it with UTC (Coordinated Universal Time). This feature allows you to coordinate multiple tasks to run independent in different time zones.

The One time trigger is the easiest to set up. All you have to do is enter the day and time you want the action to take place.

The Daily trigger is based on a recurrent system and the date and time you want to start using this kind of trigger. The interval of 1 is producing a daily schedule, the interval of 2 is producing a an every other day schedule and so on.

If you opt for a Weekly trigger you must enter the date and time you want to start this schedule, the days when you want to take place and how often to repeat. Recursion of this trigger is similar to the daily one. For the interval of 1, the task will be repeated weekly, for the interval of 2, the task will be repeated every two weeks and so on.

The Monthly trigger does not have many differences from the others, you only need to select the week and the day that you want to activate your task. The recursion system is the same, the only difference being that the minimum interval of repetition is one month.

Triggers for log on

This type of trigger runs a action when a user logs onto the computer. It has a customization feature which allows you to set the action to occur for all users or only to certain users.

Triggers for idle state

This trigger determines the action to run after the entering of the computer in the idle state. The trigger conditions can be configured from the Conditions tab of the Create Task menu or from the Task Properties window.

Triggers for an event

The event based trigger determines the action to run after an event occurs. You can choose from a predefined list of events but you can also set a specific event. If you are choosing the Basic trigger settings, only one event from the specific event log will run the task. If you choose the Custom trigger settings you can enter the XML event query or a custom filter for the events that can run the task.

Triggers on workstation lock

This type of trigger runs the task when the computer is locked. You can configure from the settings if this action will be available for any user or for a specific user. You can do the same thing for the unlocking station process.

Advanced settings of triggers

Delay task for up to (random delay)

This feature allows you to insert a delay between the moment when the task was triggered and the moment when the task will take place. For example, if you have a time based trigger, the task is scheduled to be triggered at 3:00 PM and you set the Delay task for up to (random delay) to 30 minutes, your task will be triggered in between 3:00 PM and 3:30 PM.

Repeat task every:

Here you can set a repeating time for your task. So, after the task will be triggered, it will wait the amount of time specified and after that it will be triggered again. This entire process will continue until the period allocated is done.

Actions

The action is the process or a part of the process that is performed when the task is running. A task can have up to 32 actions. Every action has some settings that determine how the task is performed. You can find and edit the task’s actions from the Actions tab of the Task Properties menu or from Create Task window. When the list contains more than one action, they will be executed consecutively starting with the action from the top of the Actions tab and ending with the action from the bottom of the list. If you want to change the actions order all you have to do is to click on the action that you want to move and then use the arrow keys to move it above or below.

Types of actions

Action that activates a program

This kind of action is used for starting a program or a script. In the Settings menu of the Actions tab you enter the name of the script or the program you want to start. If one of those sequences takes command line arguments you can add, delete and edit them in the Add arguments (optional) text box. The Start In (optional) is the place where you can specify the directory for the command line that will execute your script or your program. This should be either the path to the program or the script file that leads to the files that are used by the executable file.

Action that sends an e-mail

This action is particularly useful for people who communicate a lot via email. In the settings of this action you have to enter your e-mail address, the e-mail address of the person who will receive the mail, the title of the e-mail, the message you want to be sent and you have also an optional feature to attach different files to the mail. You must also specify the SMTP server of your e-mail.

Action that displays a message

This action is used more like a reminder because it displays on your screen a text with a title. Select the Display a message category from the Actions menu and type the title and the message of the reminder.

Task Conditions

Task conditions are decide if a task can run after it was triggered. Conditions are optional and their main role is to help you accomplish a more accurate task reported to the operating situation. You can find them in the Conditions tab of the Task Properties or Create Task menu. Conditions are divided into 3 categories: idle conditions, network conditions and network conditions.

Idle conditions

With this condition you can tell the task to run only if your computer is in an idle for a certain amount of time. At every 15 minutes, Task Scheduler is checking your activity to find out if your PC has entered in the idle state. It is considered that your computer is in the idle state if the screensaver is on or if the percentage of CPU and memory operation is 0%.

As soon as the Task Scheduler has detected that your computer is in idle state, it will begin the countdown of the length of time that has been set. If you come back in this time and continue your work, the application will reset the task. You can also set the time condition to 0 and in this case the task will run when the application will detect that your computer has entered in the idle state.

If the Stop if the computer ceases to be idle condition is on, the task will stop running after the computer gets out from the idle state. Normally, this task will run just one time. To run every time the computer remains inactive you have to check the Restart if idle state resumes.

Power conditions

This condition is dedicated to the laptop users because it follows the power method of the device. While a computer receives current flow of energy from a source, the laptop can run on a battery when you do not have a stable source of power. With this condition you can set a task to run when the computer is connected to a stable and continuous source of energy after the trigger was activated. You can also set a condition. You can also configure the condition so as not to allow the task to run if the device goes on the battery power.

From this conditions you can also create a task that will tell the computer to start from the sleep mode and run the actions after it was triggered. Consider that this can happen in the hours of rest and may create troubles. To avoid this, make sure the device is at a distance where you it cannot bother you or turn it off when you rest.

Note: When the system starts running the task, the display may remain disabled even if it is no longer in the sleep mode, but it will turn on when he that a user starts working on the device.

Network conditions

With this condition you can configure a task to run if a specific named network is available or if any connection is available when the task is triggered. If you consider that your task will need network conditions to run, you can also set this in the conditions.

Task settings

Task settings are indicating how a task run, is deleted or is stopped. You can find the panel with all the available settings in the Settings tab from the Task Properties or from Create Task menu. The following list contains a description with all the available settings.

Allow tasks to run on demand

Here you can specify if the task can be run manually before or after it is scheduled by allowing it to run on demand. You can set a task to run at any time on demand. You find more information about the demand configuration in the “How to run a task on demand” topic of this article.

Run a task as soon as possible after a scheduled start is missed

This setting will assure you that a task will start running even if it could not run when it was scheduled from different reasons (the device was turned off, Task Scheduler was busy). In the default settings, the Task Scheduler will not start the task immediately when the service is available. It will wait 10 minutes and then immediately start the process.

If task fails, restart every time period

This setting will force the Task Scheduler to restart the task if the previous attempt was thwarted by an error. You have to add the time interval between the running attempts and the number of attempts to achieve.

Stop a task if it runs longer than time period

With this setting you can establish a time limit in which the task can run. This setting is used for limiting the number of tasks which need a long period of time to execute and in this way you can save resources for your computer.

If the task is not scheduled to run again, delete if after time period

This feature replaces an action that you should do it manually. If you schedule a task to run only once means that you will not need it in the future and to not unnecessarily load the list of tasks you should delete after you have used it. This setting will delete automatically the task after a period of time set by the user after it was activated. Remember, your task must include at least one trigger with an expiration date in order to select this setting.

If a task is already running you must know a few things

You must configure the Task Scheduler to know how to run the task in case if another instance of the current task is already running.

Do not try to start a new instance because the application will not run the new instance and either stop the current instance from running.

You can run a new instance in parallel. Task Scheduler is able to run different instances in parallel, so if you want to run a new instance, it will run it in the same time with the instance that is already running.

You can queue a new instance. You can set an instance to start as soon as the current task ends the activity. The Task Scheduler will add your add the new instance in a queue and the service will not stop the current task from running.

Stop the current instance. After you stop the current instance, the service will try to run on the next one.

You can run a new instance in parallel. Task Scheduler is able to run different instances in parallel, so if you want to run a new instance, it will run it in the same time with the instance that is already running.

You can queue a new instance. You can set an instance to start as soon as the current task ends the activity. The Task Scheduler will add your add the new instance in a queue and the service will not stop the current task from running.

Stop the current instance. After you stop the current instance, the service will try to run on the next one.

You can run a new instance in parallel. Task Scheduler is able to run different instances in parallel, so if you want to run a new instance, it will run it in the same time with the instance that is already running.

You can queue a new instance. You can set an instance to start as soon as the current task ends the activity. The Task Scheduler will add your add the new instance in a queue and the service will not stop the current task from running.

Stop the current instance. After you stop the current instance, the service will try to run on the next one.

Task security context

By default, the Task Scheduler runs the tasks in order with the security context of every user logged on when the task is triggered. You can modify these settings from the Security options sections of the General tab after you have selected the task that you want to modify.

For a better organization of your tasks, you can group them on users or on groups of users by clicking on the Change User or Group category.  If your user do not have administrator rights the button will be called Change User and your account will not be able to enter in the Administrators group.

The Run whether user is logged on or not feature allows you to run tasks even if the specific user is not logged on. The feature is used for tasks that need to be run on any user of the system. If this setting is checked, the tasks will not run interactively. To make a task run only when a user in logged on select the Run only when user is logged on radio button.

If the Run whether user is logged on or not feature is used, you should supply the credentials of the account no matter if you check the Do not store password or not. In the account is not logged on, the Task Scheduler will use the saved credentials in order to run the task.

When you select the Do not store password, the application will not save the credentials when you are creating a task, but will discard them after the user properly authenticates. When the service requires to run a task, it will use the Service-for-user (S4U) extensions to the logging protocol to retrieve the user’s token. In other words, the main purpose of the Service-for-user is to secure the context of the account.

How to use the Task Scheduler

After we talked about how this application works is time to talk about how we use it and to troubleshoot different errors.

Start Task Scheduler

There are several ways you can get to access this application. We will present two of them that will work on any version of Windows that you have.

Method 1 – Using Windows interface

  1. Type Control Panel in the search bar from the bottom left corner of your screen.
  2. Click on the Control Panel icon.
  3. Click on the System and Security category from the Control Panel dialog box.
  4. Click on the Administrative Tools.
  5. This will open you a list with different applications and in that list you will find Task Scheduler. Double-click on it and the application will open.

Method 2 – Using Command Prompt

  1. Type cmd in the search bar from the bottom left corner of your screen.
  2. Click on the Command Prompt.
  3. Type msd command in the console and you will open the application.

Create a task

  1. Open Task Scheduler.
  2. Select the folder from the console tree where you want to create a task. If you have not already a created folder, from the Actions tab click on the New folder… button and name your new folder.
  3. Click on the Create Task button from the Actions
  4. You must enter a name for your task in the General tab of the Create Task dialog box. Feel free to change the menu settings after your needs.
  5. Select what type of trigger you want to be attached to this action. To do this, open the Triggers tab and click on the .. button. For more information, check the information from the trigger section of this article.
  6. you must choose action or set of actions which will be found in the task. To do that, you have to enter in the Actions menu of the Create Task and click on the .. button and configure your action settings. You can check the information from the actions section of this article.
  7. Take a look at the Conditions and Settings tab to customize better the task for your needs.
  8. Click on the OK button from the Create Task dialog box to finish the task creation process.

How to change an already created task

  1. Open Task Scheduler. If you do not know how to do that, you can check the information from the “Start Task Scheduler” topic.
  2. Select from the task folder from the console that contains the task you want to change.
  3. Select the task that you want to change.
  4. Click on the Properties tab from the Action This will open the Task Properties dialog box.
  5. Click on the General tab to view the task’s general settings that you can modify. These settings are easy to understand, so you should not have problems to modify them.
  6. Optional: How to change the trigger settings. From the Triggers tab you can see what triggers the action. Select the trigger that you want to change and click on the Edit If you want to add a new trigger click on the New button and follow the steps to configure it. If you want to delete the selected task all you have to do is to click on the Delete button. For more information about the trigger configuration check the “Trigger” topic of this article.
  7. Optional: How to change the action settings. From the Actions tab you can see what actions are executed by your task. Select the action that you want to change and click on the Edit If you want to delete the selected action click on the Delete button. If you want to add a new action click on the Add button and if you need help in setting up the action you can read the information from the “Actions” topic of the article.
  8. To finish the process click on the OK button of the Task Properties dialog box and the new task will be registered. If you have already created a task that activates when you register another task, it will enable.

How to delete a task

Method 1 – Using Windows interface

  1. Open Task Scheduler. If you do not know how to do that, you can check the information from the “Start Task Scheduler” topic.
  2. Click on the Task Scheduler Library folder from the left side of the application interface. This will open a list with all your scheduled tasks.
  3. Right click on the task that you want to remove and select the Delete.

Method 2 – Using Command Prompt

  1. Type Command Prompt in the search bar from the bottom left corner of your screen.
  2. Click on the Command Prompt icon to open the console.

3.       Modify this command and paste it in the console schtasks /Delete [/S <system> [/U <username> [/P [<password>]]]]

/TN <taskname> [/F]

  1. To find more information about the command from above type schtasks /Delete /? in the console.

How to create a Task Folder

To organize better your scheduled tasks we recommend you to share them in different folders depending on their role. Note: once it was created, a task cannot be renamed. To rename a task folder you must delete it and create a new task folder.

Here is how you create a task folder:

  1. Open Task Scheduler with one of the presented methods.
  2. Select the task folder from the left table of the application interface under which you want to create a new task folder.
  3. Click on the New Folder button from the Actions.
  4. Enter the name of the new folder.
  5. Click on the OK button to finish the process.

How to delete a Task Folder

If you want to delete a folder to better organize your tasks you must ensure that it is empty. In other words, you must delete all the tasks and the subfolder tasks before you delete the task folder. If you want more information about how to delete the tasks check out the ” How to delete a task” topic of the article. Note: Task Scheduler Library is the only folder that cannot be deleted.

Here is how you delete a task folder:

  1. Start Task Scheduler with one of the presented methods.
  2. Select the task folder from the left table of the application interface.
  3. You will notice that in the Action panel you have the Delete folder Click on that option.
  4. This will open a dialog box where the application will request your confirmation for deletion. Click on the Yes option to complete the process.

How to import a task

Task Scheduler have a feature that allows you to import tasks, which will be added in a folder chosen by you. All the task characteristics (properties, triggers, conditions, actions and settings) can be found in an XML file.

Method 1 – Using Windows interface

  1. Open Task Scheduler.
  2. Select the folder where you want to import the new task. To import the task in a new folder, check the “How to create a new task folder” topic of this article.
  3. Click on the Import Task button from the Action.
  4. This action will open a window where you have find and select the path to the XML file of the task.
  5. After you entered the path to the task, the application will open the Create Task dialog box where you can find all the information about the imported task.
  6. Click on the OK button of the Create Task dialog box to finish the importing process.

Method 2 – Using Command Prompt

  1. Open Command Prompt. To do that, type cmd in the Windows search bar.
  2. Click on the Command Prompt icon to open the console.

3.       Edit and paste the following command in console. schtasks /Create [/S <system> [/U <username> [/P [<password>]]]] /XML <xmlfile> /TN <taskname> .4.       For more information about the command from above, type the following command in the console schtasks /Create /? .

How to export a task

Task Scheduler has also an integrated feature that allows you to export your task to different users. The task will be saved in a XML format that can be shared like an usual file.

Method 1 – Export a task using Windows interface

  1. Open Task Scheduler.
  2. Open the task folder which contains the task that you want to export. The list with the task folders can be found in the left side of the Task Scheduler interface.
  3. Right click on the task that you want to export and select the .. option. If you select the task, you can find this option in the Action panel.
  4. This action will open you a dialog box where you must browse the location where you want to save the task.

Method 2 – Using Command Prompt

  1. Find Command Prompt typing cmd in the Windows search bar.
  2. Click on the Command Prompt icon to open the console.
  3. Edit and paste the following command in the console: schtasks /Query [/S <system> [/P <password>]]]] /XML /TN <taskname>
  4. To find more information about the command tags type the following command in the console schtasks /Query /?
  5. Your XML file is shown in the console. Copy the task XML and paste it into a blank XML file. After the XML file is saved, it will contain all the characteristics of your task.

How to run a task on demand

This feature helps you to run a task after or before it was scheduled to run. This is possible only if the task is not disabled and the Allow task to be run on demand setting is selected for your task. Here are 2 very easy to implement methods to do this.

Method 1 – Using Windows interface

  1. Open the Task Scheduler if you have not already done that.
  2. Open the folder that contains the task you want to run.
  3. Right click on your task and select the Run If you select the task you can find this option in the Action panel from the right side of the Task Scheduler interface.

Method 2 – Using Command Prompt

  1. Right click on the Windows icon from the bottom left corner of your screen.
  2. This will open a list with shortcuts to different applications. Click on the Command Prompt (Admin) section to open the console as administrator.
  3. Edit and type this command in the Command Prompt dialog box. schtasks /Run [/S <system> [/U <username> [/P [<password>]]]] /TN <taskname>
  4. For more information about the command lines from above type in the console schtasks /Run /?.

How to stop a running task

Task Scheduler is offering a feature that allows you to end the activity of a task even if it is already running. To do that, the running task must have the If the running task does not stop when requested, force it to stop setting activated. This feature is commonly used when a task does not finish it’s activity when you finish the ending process. Here are 2 easy methods to force stop a running task.

Method 1 – Using Windows interface

  1. Open Task Scheduler with one of the methods presented in the “Start Task Scheduler” topic of this article.
  2. Select from the left side of the application interface the folder which contains the task that you want to close.
  3. Right click on your task and select the End If you select the task, this option will appear in the Actions panel from the right side of the interface.
  4. It will be displayed a dialog box where you will be asked if you want to end all instances of this task. Click on the Yes button to end stop the task.

Method 2 – Using Command Prompt

  1. Use the Windows Key + R combination to open the Command Prompt.

2. Edit and type this command to end the activity of your task schtasks /End [/S <system> [/U <username> [/P [<password>]]]] /TN taskname.

  1. To see the role of each sequence you can enter this command in the console to get all the information you need. schtasks /End /?.

How to enable a task to run

When a task is disabled it can execute the actions. You can create a task and leave it off until the moment you want to use. Here are two ways to activate a task that any kind of user can implement.

Method 1 – Using Windows interface

  1. Open Task Scheduler.
  2. Open the task folder which contains the task you want to enable.
  3. Right click on your task and select the Enable You can find the list with the tasks in the console panel. You can also select your task and run it from the Actions panel.

Method 2 – Using Command Prompt

  1. Use the Windows Key + R key combination to open Command Prompt.

2.       Edit the following command and paste it in the console dialog box: schtasks /Change [/S <system> [/U <username> [/P [<password>]]]] /TN <taskname> [/ENABLE] .

  1. Enter this command to obtain more information about the command from above: schtasks /Change /? .

How to disable a task for running

Task Scheduler has a feature that allows you to disable the activity of a task for a certain period of time. You can enable the task again any time when you will need it. For more information you can check the “Task Settings” topic of this article.

Method 1 – Using Windows interface

  1. Open the Task Scheduler if you have not done this. To learn how to do that see the information from the “Start Task Scheduler” topic of this article.
  2. Open the folder where you have the task. To do that, search the folder in the panel from the left side of the Task Scheduler interface and double click on it.
  3. This action will display in the console panel all tasks from that folder.
  4. Search the task that you want to disable and then right click on it.
  5. It will display a list with some actions, but in this case we are only interested in one. Click on the Disable option to stop your task activity.

Method 2 – Using Command Prompt

  1. To open Command Prompt right click on the Windows icon from the bottom left corner of your screen.
  2. This will open a list with different shortcuts and features. Click on the Command Prompt (Admin) to open the console as an administrator.

3.       Edit with your information the following command and paste it in the Command Prompt dialog box: schtasks /Change [/S <system> [/U <username> [/P [<password>]]]] /TN <taskname> /DISABLE .4.       You can find more information about this command line by pasting schtasks /Change /? in the console. It will display you a list with every available command of the Task Scheduler along with a short description of each one.

How to view task properties and history

The task properties contains everything we must know about every task (name, description, actions, triggers, security options, conditions and settings). The task history is a list with all the tasks created until that moment and can be viewed along with the properties. This list is based on the events tracked by Microsoft Windows Task Scheduler event log. Every action related to a task is considered an event, so every time when a task runs, is building a line in the event log. Here are 2 methods to view the task’s properties and history:

Method 1 – Using Windows interface

  1. Open Task Scheduler with one of the presented methods in the “Start Task Scheduler” topic.
  2. Open the folder that contains the task you want to view.
  3. This will open in console a list with all the task from that folder. Right click your task and select the Properties You can select the task and the Properties button will appear in the Actions panel.
  4. In the Task Properties dialog box you will find the General, Triggers, Actions, Conditions and Settings Click on any of these tabs to see the properties.
  5. Click on the History tab to view the task’s history.

Task history option can be enable and also disabled from the Action panel. There you will find the Disable All Task History / Enable All Task History buttons and depending of your wish you can configure the tasks history. Also you can view the description of an event from the events list by clicking on the History tab.

Method 2 – Using Command Prompt

  1. Right click on the Windows icon next to the Windows search bar from the bottom left corner of your screen.
  2. This will open a list with shortcut to different applications. Click on the Command prompt (Admin) category of that list to open the console as an administrator.
  3. Paste this command in the console Schtasks /Query /FO LIST /V .
  4. For more information about the command line from above type schtasks /Query /? in the console.

Next up

2018 List: Best free Android emulators for Windows 10/8.1/7

By: Ivan Jenic
7 minute read

What Android emulator is the best for my Windows PC? Bluestacks MeMu Nox Remix OS Player Droid4X AMIDuOS Windroy Genymotion Xamarin Android Player Andy We’re […]

Continue Reading

New Windows 10 security flaw gives system privileges to hackers

By: Daniel Segun
2 minute read

Recently, a security researcher @SandboxEscaper disclosed in a tweet which has been deleted (the account also has been removed), that the task scheduler is vulnerable […]

Continue Reading

Microsoft devices could support Ultrafast wireless charging in the future

By: Daniel Segun
2 minute read

Microsoft may be developing a new wireless charging system called “Ultrafast’” for its devices, if a newly discovered patent gets approved for mass production. This […]

Continue Reading

Discussions