Create automatic reboot script

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.

Right-click new text document

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.

Rename to batch file .bat

3. Edit/Modify batch file.  Right-click on file and select ‘Edit’.

Edit Batch file

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 ).

Batch shutdown command reboot

5. Save file and exit text editor.

6. From Control Panel, select ‘Administrative Tools’.

Control Panel Administrative tools

7. Select ‘Task Scheduler’.

Windows 7 Task Scheduler

8. Select ‘Task Scheduler Library’ from the left pane and then click on ‘Create Basic Task’ on the right menu.

Task Scheduler Create Basic Task

9. Input a title and description for your scheduled task.  It is important to do so, especially if you have many scheduled task.

Scheduled Task Description and Title

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.

Scheduled task time date

11. Next screen is similar to the previous one, it ask you what time.

Scheduled Task time Hour Minutes

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.

Scheduled Task Action

13. Next screen is program selection.  Click on ‘Browse’ button and select batch file location (previously created at step #2).

Scheduled Task Select Program File

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.

Basic Task Summary

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.

 

Conclusion

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.

 

Spread the love...Share on FacebookShare on Google+Pin on PinterestShare on RedditTweet about this on TwitterEmail this to someone