Let the PC restart automatically - how it works
If you always switch your PC to standby, it will slow down over time. To remedy this, you can have your PC restarted automatically. With Windows task planning, this is done quickly.
Restart PC automatically: create batch file
First, create a batch file that restarts the computer when it runs. In the next paragraph you will read how to open the batch file at the desired time using the Windows task scheduler.
- Open the Run window with the key combination [Windows] + [R] or via the search field in the Start menu.
- Type in "notepad" and confirm with [Enter]. The text editor opens.
- Enter "shutdown / r / t 0". The r stands for reboot, t specifies the time in seconds until the command is executed. Instead of performing the restart using task planning, you can define a time here. For example, if you enter "shutdown / r / t 600", the PC will restart after 10 minutes as soon as you run the batch file.
- Now save the file via "File"> "Save as" in any directory. Use "restart.bat" as the name. Important: Set the file format to "All files". Confirm with OK".
Have the restart file executed using task planning
- Open the task scheduler. To do this, search for "task planning" in the start menu search field.
- Click on "Action" in the menu bar and select "Create task".
- Give the task any name. For example "restart" and activate the option "Run with highest privileges". Under "Configure for" select your operating system.
- In the "Trigger" tab, click "New". Now you can set a schedule after which to restart. For example, select "Daily" and set 3:00 p.m. to have the PC restart every day at 3:00 p.m.
- You do not have to change anything under "Advanced". Make sure that the "Active" checkbox is ticked below and click "OK".
- Switch to the "Actions" tab and click "New" here too. Select "Start program" as the action and import your batch file using the browse button.
- In the "Conditions" tab, deactivate the "Start task only if computer is running on network" option.
- You do not have to make any changes in the "Settings" tab. Confirm the task with "OK". The PC will now be restarted according to the selected plan.
- If you want to delete or change the task, double-click the "Restart" task in the "Active tasks" list in Task Scheduler. Now you can configure the task as you wish.