How to Use Task Scheduler to Reboot Computer Automatically

Many people now leave their new computers on 24 hours a day, 7 days a week. This is possible because computers built in the last few years are able to automatically shut down their monitors and hard drives after a certain period of time to preserve energy. However, some programs do not release all of the computer resources it was using upon exit. Over a few days of constant running without a restart, it is possible that your computer will run out of resources and crash. The solution is to have your computer reboot itself periodically.

Before you try this auto reboot procedure, go to your display properties and check the energy saving features of your computer. If your computer will shut down the monitor and hard drive automatically, you may want to try this procedure if you leave your computer on 24/7.

Place this command in Task Scheduler

C:\WINDOWS\RUNDLL32.EXE shell32.dll,SHExitWindowsEx 0x2 

How to set up a scheduled task

  1. To set up a scheduled task, go to Programs/Accessories/System Tools/Scheduled Tasks
  2. Click Add a Scheduled task and the wizard will open.
  3. Click Browse and select Windows/Rundll32.exe
  4. Select Perform this task daily and select a time when you are not at your computer such as 4AM everyday.
  5. Click Finish
  6. Double click on the new Rundll32 task icon
  7. In the Run box replace what is there with
    C:\WINDOWS\RUNDLL32.EXE shell32.dll,SHExitWindowsEx 0x2 and click OK.
  8. Check the Schedule to make sure the time is correct.
  9. Right click Rundll32 icon and select Rename and rename the task to Reboot.
  10. If you leave your computer on all the time, it will automatically reboot at 4AM each morning.
  11. If you are going to leave your computer on all the time, it would be best to have the monitor shut off automatically after 10-15 minutes of non use, and to have your hard drive shut down after the same period of time. You can do this through the Display Panel (right click on a blank portion of the Desktop and select Properties. Find the “Energy Saving Features” and set it up. My energy savings features are found on the screen saver tab, but it can vary from system to system. All recent computers have these energy saving features, older computers do not.