Q: I want to reboot all the machines in my organization each night at 2 a.m. unless a user wants to cancel it. What's the easiest way to do this without additional software?

A: It's fairly easy to create a recurring scheduled task that runs every night at 2 a.m. Within that task, you could do a check for the existence of a file, and if the file exists, skip the reboot and delete the file (so next time it will reboot). If the file doesn't exist, reboot. You could then add a shortcut on your users' desktops that creates the file if they click it. A very basic batch file to check for a file in Public documents could be the following, saved as schreboot.bat.

@echo off
IF EXIST C:\Users\Public\Documents\stopreboot.txt (
del C:\Users\Public\Documents\stopreboot.txt
) ELSE (
echo rebooting in 60 seconds
shutdown /r /t 60

For the desktop shortcut, you could save the following one line as NoReboot.bat on each user's desktop.

echo Stop > "C:\Users\Public\Documents\stopreboot.txt"

For help scheduling the daily calling of the task, see this Microsoft site.

For a large number of computers, you could push with a Group policy preference, which is found under Computer Configuration, Preferences, Control Panel Settings, Scheduled Tasks. The scheduled task would just call the schreboot.bat file running as NT Authority\System every day at 2 a.m.

This is just a very high level example and one way. There would be others, and there are more elegant software solutions. I stress that you should take a close look at whether a nightly reboot is really required.

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.