For some reason you may have to reboot your computer everyday, especially on Windows, it helps a lot when your computer is freshly rebooted. We will show and describe step-by-step how to create an automatic reboot script from scratch using scheduled task on Windows 7. Note that this method has already been tested by me on the following Microsoft’s OS : Windows XP, Windows Vista, Windows 7, Windows 8 and Windows 8.1.
Make sure you follow all steps of this tutorial, otherwise you may encounter problems or it may not work at all.
How to create an automatic reboot script on Windows
1. Create a new blank text file on your desktop, or elsewhere. This will be your reboot script executed by Windows’ task scheduler.
2. Rename file to a batch format : script.bat or reboot.bat. Don’t forget to accept notice that will change file extension and therefore make it executable.
3. Edit/Modify batch file. Right-click on file and select ‘Edit’.
4. Input the following command in text editor : shutdown /r /t 0. This command tells the computer to reboot ( /r ) within 0 second ( /t 0 ).
5. Save file and exit text editor.
6. From Control Panel, select ‘Administrative Tools’.
7. Select ‘Task Scheduler’.
8. Select ‘Task Scheduler Library’ from the left pane and then click on ‘Create Basic Task’ on the right menu.
9. Input a title and description for your scheduled task. It is important to do so, especially if you have many scheduled task.
10. In our example we will make our script run everyday at 9pm. So on the next screen we select ‘daily’. If you need it to be running at different period, you need to select appropriate time here.
11. Next screen is similar to the previous one, it ask you what time.
12. Next question is, what we would like scheduled task to do ? Here we want it to execute a batch file which is considered as a program to Windows. So we will select ‘Start a program’ here.
13. Next screen is program selection. Click on ‘Browse’ button and select batch file location (previously created at step #2).
14. On the next screen, do not forget to check the following checkbox : ‘Open properties dialog for this task when I click finish’. This option will allow you to set one more thing to make sure it will run smoothly.
15. Last step is selecting radio button ‘Run wether user is logged in or not’. This option will reboot computer even if no user are logged on. If you do not want this, simply cancel screen.
You now have a fully operational rebooting script automated by Windows scheduled task. Note that created file at step #2 is a requirement to all of this to be operational. Also you can think of any other automated script using this method.