Task Scheduler is a hidden gem in Windows that many users overlook. I was no different—until I finally tried it and wondered why I hadn’t used it sooner. From scheduling PC restarts to running custom scripts, here are some tasks you can effortlessly automate with this powerful tool.
1
Schedule a PC Restart
How often do we leave our laptops or computers running for days or weeks without a restart? If you don’t reboot your system regularly, updates may not apply, memory may not clear, and performance issues could arise. But if you often forget or feel too lazy to restart manually, you can automate the process using Task Scheduler.
To schedule a PC restart, type Task Scheduler in Windows Search and open the utility. Click “Create Basic Task,” name it PC Restart, and click “Next.” Choose “Daily” as the trigger, set the restart time, and enter 1 to repeat the task every day. Click “Next,” then select “Start a Program.” In the Program/Script field, type shutdown.exe, and in the Add Arguments field, enter /r /f /t 0.
Click “Finish,” and your computer will restart automatically at the set time—just be sure to pick a time when you’re not using it to prevent losing any unsaved work.
2
Schedule an App to Open Up
We all have apps we use almost daily, and some we want to open automatically when we start our computer. While adding them to startup programs is an option, it can slow down boot time. Instead, I use Task Scheduler to schedule these apps to launch at a specific time—immediately after my scheduled restart, as mentioned earlier.
To set this up with the Task Scheduler, open the utility, click “Create Basic Task,” assign a name, choose a trigger (I select “Daily”), pick the time, and then select the action “Start a Program.” In the Program/Script field, click “Browse,” navigate to the app’s .EXE file, select it, click “Next,” and then “Finish.”
This way, when I start my day at my desk, my PC is fully restarted, and my chosen app is ready. I also schedule other work-related apps to launch at specific intervals when needed.

Related
How to Quickly Launch Apps on Windows 11 Using Keyboard Shortcuts
Load your Windows programs from the comfort of your keyboard.
3
Run Custom Script
You can create custom scripts to automate repetitive tasks and save time, such as running maintenance tasks, backing up new data daily, or automating personal tasks that take up unnecessary time. Once the script is ready, you can schedule it using Task Scheduler so it runs automatically without requiring manual execution.
To use this method, prepare your script first. Then, create a task, enter a name and description, and click “Next.” Define the trigger for when the script should run, then select “Start a Program” and click “Next.” If you’re running a PowerShell script, type powershell.exe in the Program/Script field and provide the full script path in the Add Arguments field.
Click “Next,” then “Finish.” In the Settings menu, you can also adjust additional settings for the task to fine-tune its behavior.

Related
Shell Scripting Is Still Relevant! 7 Reasons to Learn Bash Scripting
With so many sophisticated programming languages out there, is there a place for Bash Scripting?
4
Schedule Windows to Lock Automatically
Sometimes, we leave our computer unattended without locking it, which can put sensitive data at risk, especially in an office environment. Additionally, the laptop can drain the battery faster when unlocked. To avoid these issues, you can use the Task Scheduler to automatically lock your computer after a set period of inactivity.
To do this, open Task Scheduler, click “Create Task,” go to the “Triggers” tab, select “New,” choose “On Idle” as the trigger, and click “OK.” Next, in the “Actions” tab, click “New,” select “Start a Program,” and enter C:\Windows\System32\rundll32.exe in the Program/Script field with user32.dll LockWorkStation as the argument. Click “OK.”
Then, go to the “Conditions” tab, check “Start the task only if the computer is idle for,” and set your preferred idle duration.
5
Automatically Empty the Recycle Bin
One thing I still forget to do is empty the recycle bin. Although it’s as simple as right-clicking and selecting “Empty Recycle Bin,” I often overlook it. If left unchecked for a long time, it can take up storage space, and anyone can access my sensitive data, even after clearing it. Additionally, if you need to restore a file you accidentally deleted, finding it in the clutter can be hard.
To solve this, I use the Task Scheduler to empty the recycle bin automatically. To set this up, open the Task Scheduler, click “Create Task,” enter a name and description, and create a new trigger for when you want the recycle bin emptied. Then, go to the “Actions” tab, select “Start a Program” from the dropdown menu, and type cmd.exe in the Program/Script field.
Next, enter /c echo Y| PowerShell.exe -NoProfile -Command Clear-RecycleBin in the Add Arguments field, and click “OK.” Now, the Command Prompt will launch at the scheduled time. Simply press Enter to confirm and empty the recycle bin. However, note that this process deletes everything, so you might not be able to restore it.
That’s how I use Task Scheduler to automate specific tasks. If you haven’t tried it yet, you’re definitely missing out.