While you can always use the Shutdown /s /t 60 command and create a desktop shortcut to delay the shutdown of your Windows 11/10/8/7 computer by (in this case 60 secs) or make it shut down at a particular time after calculating the time in seconds, you can also use the Task scheduler to shut down, restart or perform any action at one time or periodically.
Schedule Shutdown or Restarts in Windows 11/10
Using the Task Scheduler, you can schedule the computer to shut down at a certain time in the night or any time! And why might you want to do this? Maybe your computer is processing a task, or maybe it is downloading files from the Internet, and you do not want to wait till then. You can then schedule it to shut down after, say, 2 hours while you go on to catch up on your beauty sleep!
To make your computer shut down at a particular time, type taskschd.msc in Start search and hit Enter to open the Task Scheduler. In the right panel, click on Create Basic Task.
Give it a name and a description if you wish, and click Next.
When asked When do you want the task to start, select One time. Click Next.
Select the Start date and time.
Clicking Next will bring you to the Action page. Here select Start a program and click on Next.
Here type shutdown on the Program/script space and /s /f /t 0 in the Add arguments box. If you want the shutdown to commence after, say 60 sec, type 60 instead of 0 here.
Click Next to review all and finally click Finish. Your computer will shutdown on the designated day and time.
NOTE: In a CMD window, you may run shutdown /? to see all the available switches. To schedule restarts, you need to use the /r parameter instead of the /s parameter. To log off the current user, use /l.
If you are looking out for faster ways to do it, take a look at some of these free tools to Auto Shutdown, Restart Windows PC at fixed times.
How do I stop Windows from restarting automatically?
You can disable the task from the scheduler, or if you are getting a shutdown prompt, you can use the abort command. Open Run prompt (WIn + R), type shutdown -a, and press the Enter key. Make sure to execute it as soon as you get the message about the shutdown.
Why does my PC keep on restarting?
If it’s not a schedule that you have set to restart the PC, then hardware is failing on your PC. It could be the RAM or storage device that can result in a Reboot loop.
- How to Fix Snipping Tool Not Working on Windows 11
- How to Fix “Your Computer Has a Memory Problem” Windows 11/10/7 [MiniTool Tips]
- How to Set Up Reminders in Windows
- How to Fix Code 19 Errors
- [Fixed] Logitech G923 Controller Disconnected/ Not Working 2023
What to do if your computer is stuck on restarting?
Press and hold the power button for six to seven seconds until the PC shuts down, and there is nothing on the screen. If this is happening too often, i.e., PC stuck on Restarting, you need to check for any hardware failure or software issue.
Thanks, Keith Hooker and Archie Christopher.
— Update: 19-03-2023 — us.suanoncolosence.com found an additional article Windows Automation: 7 Useful Tasks to Schedule With Task Scheduler from the website www.maketecheasier.com for the keyword schedule shutdown restarts windows 7 task schedular.
While you might be familiar with Task Scheduler, you might not know of all the useful tasks to schedule with Task Scheduler. You’re likely to have your own set of preferred tasks, but if you’re just getting started and want to see Windows automation in action, start with tasks that benefit most users. Schedule all these or just a few, depending on how much you want to automate your Windows experience.
How to Use Task Scheduler
Before diving into the tasks you may want to schedule, it’s important to understand the basics of automating and scheduling tasks. Remember, you can create both basic and complex tasks. Just make sure you test each new task to ensure it runs properly.
1. Set a Reminder
While there are other methods to set a reminder, Task Scheduler works well for this purpose, even though Microsoft deprecated the “display a message” action.
- Open Notepad and enter the following:
@echo off title NameofReminder echo ReminderMessage pause
Replace “NameofReminder” with a name for your reminder and “ReminderMessage” with the actual reminder text.
- Save the file with any name you want and the extension .cmd.
- Open Task Scheduler via the Start Menu or an alternative method.
- Select “Create Task.”
- Under the “General” tab, enter a name for your reminder task and choose “Windows 10” in the “Configure for” drop-down box. There isn’t a Windows 11 option yet. For Windows 11, just choose “Windows 10.”
- Under the “Triggers” tab, select “New.”
- Set when you want to begin the task. If it’s on a schedule, set a time and how often the task should repeat.
- Press “OK” to save your settings.
- Select the “Actions” tab and click “New” to create a new action.
- Select “Start a program” under “Action” and press “Browse” to navigate to the Notepad file you saved earlier.
- Once set, you’ll get a reminder via the Command Prompt at your chosen time/trigger, like this.
This can work well for a daily to-do list reminder. You can set up a reminder for other users on the same PC by switching users in the “General” tab.
2. Set Up Restore Points
Windows 11 doesn’t create system restore points as often as previous Windows versions. But, if you want to create restore points automatically on a set schedule, use Task Scheduler.
- Open Task Scheduler and expand “Task Scheduler Library -> Microsoft -> Windows -> System Restore.”
- Select the “System Restore” folder to display the System Restore task that already exists.
- Right-click the existing task and select “Properties.”
- Under the “Triggers” tab, select “New,” then set your desired schedule. To avoid filling your hard drive with numerous System Restore points, only schedule this to happen weekly. If you make many system changes daily, you may prefer a daily restore point.
If you ever need to remove excess restore points, open Start and search for “Recovery.” Select the “Recovery (Control Panel)” option. Then, select “Configure System Restore” and click “Configure.”
Press “Delete” to delete all existing restore points. You’ll definitely want to create another soon to replace what you’ve deleted.
3. Restart, Shut Down, or Hibernate Your PC
It’s not uncommon to leave your PC running, but it’s healthy to at least restart it regularly to refresh your system. One of the most useful tasks to schedule with Task Scheduler is an automatic shutdown, restart, or hibernation (sleep), so you never have to worry about forgetting to do it.
- The Product Key you Entered didn’t Work 0xc004f050 [Fixed]
- How to Set an Inactive Account Manager on Google
- 8 Most Expensive Computer Mice on the Market
- How To Fix “Not Enough Memory Resources Are Available To Process This Command”
- The 12 Best Coding Games of 2022
- Create a BAT file in Notepad using one of the following commands:
c:windowssystem32shutdown -s -f -t 00
Replace the drive letter if Windows isn’t installed on C: drive. This command shuts Windows down after force-closing all open apps. Replace “00” with a time in seconds if you want a slight delay, such as “60” to delay shutdown for 60 seconds.
If you want to restart the computer, use this command:
c:windowssystem32shutdown -r -t 00
Try this command if you want to put the PC to sleep:
- Save your file with the desired name, such as “Shutdown” or “Restart,” and the .bat extension.
- In Task Scheduler, select “Create Task.” Name your task in the “General” tab and create a “New” trigger under the “Triggers” tab just like you did when setting a reminder.
- Set the schedule to what works best for you. Daily is ideal, but it can also be weekly.
- Under the “Actions” tab, select “New.”
- Choose “Start a program” and browse to your BAT file in the “Program/script” section.
- Press “OK” to save your changes and task.
- Right-click the task and ensure it works properly, after saving all open files first.
4. Open Your Browser and Favorite Sites
Sure, it only takes a few seconds to click your browser’s icon to launch it, but wouldn’t it be nice to automate the process? Not only could you have your browser open automatically at your PC’s startup, but you can also set a task to open specific sites, so you’re ready to sit down and start your day in a few seconds.
- Open Task Scheduler and select “Create task.”
- Give your task a name in the “General” tab. This could be your browser’s name or anything else that’s easy for you to identify in Task Scheduler.
- Select “New” under the “Triggers” tab.
- Decide when to begin the task. If you choose “On a schedule,” set your desired schedule. You can also choose other options, such as “At log on” or “At startup.” Press “OK” to save your settings.
- Under the “Actions tab,” select “New.”
- Choose “Start a program” and then browse to your desired browser’s executable file. If you just want to open your browser, press “OK” to save your changes. If you want to set up sites to open, continue to the next step.
- Enter the URLs of the sites you want to open in the “Add arguments” box. Separate each site with a space.
- Press “OK” on each open window to save your changes. Right-click the task and select “Run” if you want to test it.
5. Open Apps
You can launch any apps you want just like you opened your browser in the section above. For instance, I like to launch my browser at logon with a few websites I use often and automatically open LibreOffice Writer side by side.
To set up an app to launch automatically, follow the steps you used to open your browser but navigate to the executable file for your desired app.
You can add multiple actions for a task. So, you could create a “Morning Routine” task that has actions for opening your browser, email client, word processor, and anything else you need.
6. Open Files
Opening apps is useful enough, but you might find it even more helpful to open specific files. Some users even use this task to generate reports if they have macros enabled to run automatically in Excel, Word, or other apps. I like to open up my spreadsheet with all current projects, accounting details, and notes.
- Open Task Scheduler and create a new task.
- Name your task in the “General” tab. Always choose the correct version of Windows under “Configure for.”
- Under “Triggers,” create a new trigger. You can set the trigger for a specific schedule or at startup or logon.
- Under “Actions,” create a new action and browse to your file in the “Program/script” box.
- Save your task by exiting each window by pressing “OK.”
7. Empty Your Recycle Bin
It’s easy to just dump files into the Recycle Bin and never think about them again. But, those files are still on your hard drive and taking up valuable space. If you don’t want to think about them again, use Task Scheduler to automatically empty the Recycle Bin on a schedule. Just remember that once something’s gone out of the Recycle Bin, it’s incredibly difficult to retrieve.
- Open Task Scheduler and create a new task as usual.
- Name the task something related to Recycle Bin or Recycle.
- Under “Triggers,” set the schedule to daily, weekly, or monthly. For most users, weekly or monthly works well.
- Under “Action,” type the following into the “Program/script” box:
- In the “Add arguments” box, enter the following:
-NoProfile -Command "Clear-RecycleBin -Force"
- Save your task as usual.
Frequently Asked Questions
Can I limit tasks to specific users?
Can I edit a task?
How can I better organize my tasks?
Image credit: Andrea Piacquadio via Pexels.