Geeks in Phoenix

Geek Blog


How to use Task Scheduler inside of Windows 10 and Windows 11

Have you ever wanted a program on your computer to run automatically at a specific time? Maybe you want to defrag a drive or clean up your computer in the background? If so, here is how to use Task Scheduler inside Windows 10 and Windows 11.

How to use Task Scheduler inside of Windows 10 and Windows 11

Task Scheduler has to be one of the most utilized of all of the programs inside Windows. It is one of those apps you never really think about because it works in the background and runs everything from syncing the time to running Windows Update.

And if you have your anti-virus software perform scheduled scans, it is more than likely to use Task Scheduler. There are so many things that Task Scheduler can do that are kind of mind-blowing.

I have been known to write script files containing multiple actions to have Task Scheduler run them. A simple script file can empty a network folder of temporary scanned files on a regular schedule.

But you do not have to know how to write code to use Task Scheduler. You only need to know what program you want to run, where it is located, and when and how often you want to run it. This is where we get into Triggers and Actions.

Simply put, their names, Triggers and Actions, are pretty self-explanatory. Triggers are the conditions that have to happen to start the Action, and the Action is what program or script is executed. With all this said, let's look at Task Scheduler.

How to open Task Scheduler in Windows 11

  1. Left-click on the Start button Windows logo to bring up the Start menu.
  2. In the upper right-hand corner of the Start menu, left-click on All apps.
  3. Scroll down the list of programs and left-click on Windows Tools.
  4. Left-click on Task Scheduler.

How to open Task Scheduler in Windows 10

  1. Left-click on the Start button Windows logo to bring up the Start menu.
  2. Scroll down the list of programs to Windows Administrative Tools and left-click to expand.
  3. Left-click on Task Scheduler.

Once Task Scheduler has opened, you will see three columns; Console Tree (left), Task Scheduler summary (center), and the Action Pane (right).
The Task Scheduler inside of Windows 11
Left-click on the Task Scheduler Library in the Console Tree to display all of the tasks that have been scheduled.

In the task summary in the center column, you will find a list of general tasks.
The Task Scheduler library screen
This is where any custom tasks should be created. I recommend using the Create Basic Task... shortcut over the Create Task shortcut in the Action Menu. It is a straightforward interface and if you need to, you can modify the properties later.

For this demonstration, I am going to use the built-in Disk Cleanup program. Using the steps outlined in the following articles, I created a command-line configuration, and I am going to use that to create a task.

Clean up Windows 11 with Storage Sense and Disk Cleanup

Clean up Windows 10 with Disk Cleanup

How to create a basic task in Task Scheduler

The following instructions will create a task for the built-in Disk Cleanup program. A previous setup using an Admin Command Prompt was required to set the parameters for cleanmgr.exe (see articles above).

  1. Left-click on the Create Basic Task... link in the Action Menu.
    The Create Basic Task Wizard screen
    The Create Basic Task Wizard appears.
  2. Give the new task a Name and Description, and then Left-click on Next.
  3. Select when you want the task to start (trigger) and then left-click on Next.
    The Create Basic Task Wizard Task Trigger screen
    If you select Daily, Weekly, Monthly, One time, or When a specific event is logged, you will be prompted for more specific parameters.
  4. You now have to select what task you want to perform.
    The Create Basic Task Wizard Action screen
    Usually, you would select Start a program and then left-click on Next.
  5. On the right side of the Program/script field, left-click the Browse button,
    The Create Basic Task Wizard Start a Program screen
    navigate to C:\Windows\System32\, and select cleanmgr.exe.
  6. In the Add arguments section, type /sagerun:n and select Next.
  7. Then select Finish, and you're all set.

Using Task Scheduler in Windows 8

The Task Scheduler inside of Windows 8 automates scheduling system tasks, which perform actions at a specific time or when a particular event occurs, such as checking for updates or running scripts. Task Scheduler provides an organized view of scheduled tasks and a convenient point of access for managing them.

The main screen for Task Scheduler inside of Windows 8
The main screen for Task Scheduler inside of Windows 8

If you use a specific program regularly, you can use the Create Basic Task Wizard to create a task that opens the program for you automatically according to the schedule you choose. For example, if you use a financial program on a specific day each month, you can schedule a task that opens the program automatically, so you don't risk forgetting to open it yourself.

Running Task Scheduler in Windows 8

  1. On the Start menu, swipe in from the right side of the screen or press the Windows logo key Windows logo key + C to bring up the Charm bar.
  2. Left-click on the Settings button in Charm Bar.
  3. Left-click on Tiles in Settings.
  4. Drag the Show/hide administrative tools slider to the Yes position.
  5. Left-click on the background of the Start menu, making the Charm bar disappear.
  6. Once the administrative tools appear, left-click on Task Scheduler.

or

  1. Swipe in from the right side of the screen or press the Windows logo key Windows logo key + C to bring up the Charm bar
  2. Left-click on Search button in Charm Bar.
  3. Left-click on Apps in Search.
  4. Type Task Scheduler in the Search field on the Search pane
  5. In the results on the left-hand side, left-click on Task Scheduler.

If you are prompted for an administrator password or confirmation, type the password or provide confirmation.

Click the Action menu, and then click Create Basic Task.

  • Type a name for the task and an optional description, and then click Next.

Select one of the following:

  • To select a schedule based on the calendar, click Daily, Weekly, Monthly, or One time, click Next, specify the schedule you want to use, and then click Next.
  • To select a schedule based on common recurring events, click When the computer starts or When I log on and then click Next.
  • To select a schedule based on specific events, click When a specific event is logged, click Next, specify the event log and other information using the drop-down lists, and then click Next.
  • To schedule a program to start automatically, click Start a program, and then click Next. Click Browse to find the program you want to start, and then click Next.

Click Finish.

Triggers and Actions

The two key concepts involved in scheduling a task are triggers and actions. A trigger causes a task to run, and an action is the work that is performed when the task is run. The actions a task can perform include running a program, sending an e-mail message, and showing a message box. For example, you can send an e-mail when a certain event entry is logged in the event log or run a maintenance script when a user logs on to a computer. Occurrences that can trigger a task to run include: a computer starting up, a computer entering an idle state, or a user unlocking a workstation. In addition, you can schedule a task to run at a specified time.

Clean up your hard drive in Windows 8 with Disk Cleanup

During your computer's everyday use, you will accumulate some unnecessary files (temporary setup/internet files, recycle bin, etc.). You can remove these files with the built-in Disk Cleanup (cleanmgr.exe) utility inside of Windows 8. When it comes to computer repair, I use it all the time on my client's systems. And it can be run a couple of different ways and with different options.

Running Disk Cleanup on demand

There are a couple of different ways to run Disk Cleanup on demand. The following procedure cleans up files associated with your user account. You can also use Disk Cleanup to clean up all the files on your computer.

Windows 8 Disk Cleanup dialog box with standard options
Windows 8 Disk Cleanup dialog box with standard options

  1. On the Start menu, swipe in from the right side of the screen or press the Windows logo key Windows logo key + C to bring up the Charm bar.
  2. Left-click on the Settings button in Charm Bar.
  3. Left-click on Tiles in Settings.
  4. Drag the Show/hide administrative tools slider to the Yes position.
  5. Left-click on the background of the Start menu, making the Charm bar disappear.
  6. Once the administrative tools appear, left-click on Disk Cleanup.

or

  1. Swipe in from the right side of the screen or press the Windows logo key Windows logo key + C to bring up the Charm bar.
  2. Left-click on Search button in Charm Bar.
  3. Left-click on Apps in Search.
  4. Type Disk Cleanup in the Search field on the Search pane.
  5. In the results on the left-hand side, left-click on Disk Cleanup.

After selecting the drive you want to clean, Disk Cleanup scans it for possible files to delete. It then allows you to choose which files to delete. When you click the Clean up system files button, it restarts with a More Options tab. This tab includes two additional ways to free even more disk space:

Windows 8 Disk Cleanup dialog box with more options
Windows 8 Disk Cleanup dialog box with more options

  • Programs and Features. This option opens Programs and Features in Control Panel, where you can uninstall programs that you no longer use. The Size column in Programs and Features shows how much disk space each program uses.
  • System Restore and Shadow Copies. With this option, you can delete all but the most recent restore point on the disk.
    System Restore uses restore points to return your system files to an earlier point in time. If your computer is running normally, you can save disk space by deleting the earlier restore points.
    In some editions of Windows 8, restore points can include previous versions of files, known as shadow copies, and backup images created with Windows Complete PC Backup. These files and images will also be deleted.

Running Disk Cleanup with predefined options

You can also run Disk Cleanup from a command prompt. This gives you the option of predefined settings for running Disk Cleanup as a scheduled task in Task Scheduler or a shortcut on your Desktop or Start menu. Click here for more information on how to open a Command Prompt with Administrator privileges in Windows 8.

Windows 8 Disk Cleanup run at a command prompt with sageset option
Windows 8 Disk Cleanup run at a Command Prompt with sageset option

You can start the Disk Cleanup tool by running cleanmgr.exe. Disk Cleanup supports the following command-line switches:

  • cleanmgr /d driveletter: - This switch selects the drive that you want Disk Cleanup to clean. Note that the /d switch is not used with /sagerun:n.
  • cleanmgr /sageset:n - This switch displays the Disk Cleanup Settings dialog box and creates a registry key to store the settings you select. The n value is stored in the registry and allows you to specify different Disk Cleanup tasks to run. The n value can be any integer value from 0 to 65535. To get all the available options when you are using the /sageset switch, you may need to specify the drive letter that contains the Windows installation.
  • cleanmgr /sagerun:n - This switch runs the specified tasks that are assigned to the n value by using the /sageset switch. All drives in the computer will be enumerated, and the selected profile will be run against each drive.

To run Disk Cleanup with the /sagerun:n switch in Task Scheduler or in a Desktop or Start menu shortcut, you would use something similar to the following:

C:\Windows\System32\cleanmgr.exe /sagerun:n

Using Task Scheduler in Windows Vista and Windows 7

You must be logged on as an administrator to perform these steps. If you are not logged on as an administrator, you can only change settings that apply to your user account.

If you use a specific program regularly, you can use the Task Scheduler Wizard to create a task that opens the program for you automatically according to the schedule you choose. For example, if you use a financial program on a specific day each month, you can schedule a task that opens the program automatically, so you don't risk forgetting to open it yourself.

To run Task Scheduler.

  1. Click the Start button.
  2. Click Control Panel.
  3. Click System and security.
  4. Click Administrative Tools.
  5. Double-click Task Scheduler.

If you are prompted for an administrator password or confirmation, type the password or provide confirmation.

Click the Action menu, and then click Create Basic Task.

Type a name for the task and an optional description, and then click Next.

Do one of the following:

To select a schedule based on the calendar, click Daily, Weekly, Monthly, or One time, click Next, specify the schedule you want to use, and then click Next.

To select a schedule based on common recurring events, click When the computer starts, or When I log on and then click Next.

To select a schedule based on specific events, click When a specific event is logged, click Next, specify the event log and other information using the drop-down lists, and then click Next.

To schedule a program to start automatically, click Start a program, and then click Next.

Click Browse to find the program you want to start, and then click Next.

Click Finish.

Triggers and Actions

The two key concepts involved in scheduling a task are triggers and actions. A trigger causes a task to run, and an action is the work that is performed when the task is run. The actions a task can perform include running a program, sending an e-mail message, and showing a message box. For example, you can send an e-mail when a certain event entry is logged in the event log or run a maintenance script when a user logs on to a computer. Occurrences that can trigger a task to run include: a computer starting up, a computer entering an idle state, or a user unlocking a workstation. In addition, you can schedule a task to run at a specified time.

Using Scheduled Tasks in Windows XP

With Scheduled Tasks, you can schedule any script, program, or document to run at a time that is most convenient for you. Scheduled Tasks starts each time you start Windows XP and runs in the background.

With Scheduled Tasks, you can also:

  • Schedule a task to run daily, weekly, monthly, or at certain times (such as system startup).
  • Change the schedule for a task.
  • Stop a scheduled task.
  • Customize how a task will run at a scheduled time.

Common tasks

Some of the tasks you may want to schedule are Disk Defragmenter or Backup.

Create a scheduled task

Before a task can be scheduled to run, one or more tasks must be created.

To schedule a new task

  1. Open Scheduled Tasks.
  2. Double-click Add Scheduled Task.
  3. Follow the instructions in the Scheduled Task Wizard.

Notes:

  • To open Scheduled Tasks, click Start, point to Programs, point to Accessories, point to System Tools, and then click Scheduled Tasks.
  • If you want to configure advanced settings for the task, select the Open advanced properties for this task when I click Finish check box on the wizard's final page.
  • Confirm that your computer's system date and time are accurate because Scheduled Tasks relies on this information to run scheduled tasks. To verify or change this information, double-click the time indicator on the taskbar.
  • If you leave the password blank and want the task to run when you log in, open the task. On the Task tab, select the Run only if logged on check box. The task will run at its scheduled time when the user who created the task is logged on to the computer.

Modify a scheduled task

Created scheduled tasks can be modified. You can change the program, the schedule, or the specifics of a particular task.

To modify a scheduled task

  1. Open Scheduled Tasks.
  2. Right-click the task you want to modify, and then click Properties.
  3. Do one or more of the following:
    • To change a program being run, in Run, type the path for the new program.
    • To change the schedule for the task, click the Schedule tab.
    • To customize the task settings, such as maximum run time, idle time requirements, and power management options, click the Settings tab.
    • To set security for the task, click the Security tab.

Notes:

  • To open Scheduled Tasks, click Start, point to Programs, point to Accessories, point to System Tools, and then click Scheduled Tasks.
  • If you change the user account or the program that is being run, you must supply the user account's password.
  • If the task program requires command-line options, type them in Run, after the task path.
  • If the path to the task program includes spaces, type double quotation marks ("") around the entire task path. For example:
    "C:\Program Files\Windows Media Player\Mplayer2.exe"
  • Confirm that your computer's system date and time are accurate because Scheduled Tasks relies on this information to run scheduled tasks. To verify or change this information, double-click the time indicator on the taskbar.

Remove a scheduled task

For scheduled tasks that are no longer needed, you can remove them entirely.

To remove a scheduled task

  1. Open Scheduled Tasks
  2. Right-click the task that you want to remove, and then click Delete.

Notes:

  • To open Scheduled Tasks, click Start, point to Programs, point to Accessories, point to System Tools, and then click Scheduled Tasks.
  • Removing a scheduled task only removes the task from the schedule. The program file the task runs is not removed from the hard disk.
  • You can also remove a scheduled task by selecting it and then pressing DELETE.

Stop a scheduled task that is running

In the event that a task starts while you are using your computer, you can stop the task and then restart it later.

To stop a scheduled task that is running

  1. Open Scheduled Tasks.
  2. Right-click the task that you want to stop, and then click End Task.

Notes:

  • To open Scheduled Tasks, click Start, point to Programs, point to Accessories, point to System Tools, and then click Scheduled Tasks.
  • If a scheduled task is started and then stopped, End Task does not stop all other programs that the scheduled task might have started.
  • If you stop a scheduled task currently running, you might experience a delay (up to three minutes) before the task shuts down.
  • To restart a stopped task, right-click the task, and then click Run.

Temporarily turn off all scheduled tasks

You can temporarily turn off or pause all scheduled tasks from running and then turn on the tasks later.

To pause Scheduled Tasks

  1. Open Scheduled Tasks.
  2. On the Advanced menu, click Pause Task Scheduler.

Notes:

  • To open Scheduled Tasks, click Start, point to Programs, point to Accessories, point to System Tools, and then click Scheduled Tasks.
  • The Pause Task Scheduler command is useful if you do not want scheduled tasks to run at the same time as you are installing software or running another program (such as a game).
  • Tasks scheduled to run while Scheduled Tasks are paused are not run until their next scheduled time.
  • To resume the schedules for all tasks, on the Advanced menu, click Continue Task Scheduler.

Free computer diagnostics

Repairing a PC can sometimes be expensive, and that is why we offer free basic in-shop diagnostics. Give one of our professional and experienced technicians a call at (602) 795-1111, and let's see what we can do for you.

Check out our reviews

Geeks In Phoenix LLC, BBB Business Review

Customer service is #1

Here at Geeks in Phoenix, we take pride in providing excellent customer service. We aim to give the highest quality of service  from computer repair, virus removal, and data recovery.

Bring your computer to us and save

Repairing a computer can be time-consuming. That is why we base our in-shop service on the time we work on your computer, not the time it takes for your computer to work! From running memory checking software to scanning for viruses, these are processes that can take some time.

Contact us

If you have any questions, please feel free to give us a call at (602) 795-1111  and talk with one of our Geeks. Or you can send us a message from our contact page , and one of our Geeks will get back to you as soon as possible. Or you can stop by and see us. Here are our hours and location.

Like Geeks in Phoenix on Facebook

Follow Geeks in Phoenix on Twitter

Watch Geeks in Phoenix on YouTube