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.
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
- Left-click on the Start button to bring up the Start menu.
- In the upper right-hand corner of the Start menu, left-click on All apps.
- Scroll down the list of programs and left-click on Windows Tools.
- Left-click on Task Scheduler.
How to open Task Scheduler in Windows 10
- Left-click on the Start button to bring up the Start menu.
- Scroll down the list of programs to Windows Administrative Tools and left-click to expand.
- 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).
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.
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).
- Left-click on the Create Basic Task... link in the Action Menu.
The Create Basic Task Wizard appears.
- Give the new task a Name and Description, and then Left-click on Next.
- Select when you want the task to start (trigger) and then left-click on Next.
If you select Daily, Weekly, Monthly, One time, or When a specific event is logged, you will be prompted for more specific parameters.
- You now have to select what task you want to perform.
Usually, you would select Start a program and then left-click on Next.
- On the right side of the Program/script field, left-click the Browse button,
navigate to C:\Windows\System32\, and select cleanmgr.exe.
- In the Add arguments section, type /sagerun:n and select Next.
- Then select Finish, and you're all set.
9b3356ea-9775-4330-b651-9079f69d0eb6|2|5.0|96d5b379-7e1d-4dac-a6ba-1e50db561b04