Your best source of information and news about drivers, software and Vista hardware on the internet

Vista ARTICLES TOP 50 Spyware Virus Vista SOFT Vista HELP

Schedule a reboot in Windows 2003


There is always one application…yes one application that you use all the time, and can’t afford to have it down for one minute during the day.

This same application is buggy and always has problems if it keeps running day after day. You need to reboot once in a while. Yes, and this means you need to stay late and wait until everyone leaves…and then reboot.

There is a simple solution to the problem…the shutdown command in windows 2003. It can shutdown or reboot your system from the command line, and will even allow you to specify reason codes for the shutdown. Here is the lowdown on its possible options:

Usage: shutdown [-i | -l | -s | -r | -a] [-f] [-m \\computername] [-t xx] [-c “comment”] [-d up:xx:yy]

No args Display this message (same as -?)
-i Display GUI interface, must be the first option
-l Log off (cannot be used with -m option)
-s Shutdown the computer
-r Shutdown and restart the computer
-a Abort a system shutdown
-m \\computername Remote computer to shutdown/restart/abort
-t xx Set timeout for shutdown to xx seconds
-c “comment” Shutdown comment (maximum of 127 characters)
-f Forces running applications to close without warning
-d [u][p]:xx:yy The reason code for the shutdown
u is the user code
p is a planned shutdown code
xx is the major reason code (positive integer less than 256)
yy is the minor reason code (positive integer less than 65536)


So, if I wanted to shutdown the machine at a specified time I could create a script with the following:

shutdown -r -f -c “Shutdown to refresh buggy program”

The -f makes sure no application can keep the shutdown from happening, and the -c allows me to add a comment in the event log. The -r tells it to reboot.

Now I have saved this as RebootDaily.bat (Under the windows folder)

Lets schedule it to run daily at 3am. Open the control panel and double click on the “Scheduled Tasks”, and browse for the batch file that we just saved.

Schedule Reboot Daily

Click next, and set the time you want the reboot to start. If you have any backup jobs I would make sure the job time is far from your reboot.

Schedule Reboot 3AM

Click next and set the user account that will be used for the reboot. I suggest setting up a separate account with specific permissions for this task. That way you can slightly relax your password change policy - and lock it down so it can’t do much but reboot the system. Otherwise you will need to make sure you update this task each time the administrator password is changed.

Schedule Reboot Password

Click next, and then finish. Your reboot has been scheduled. Just makes sure it works by manually running it once.

Now your buggy application can get a fresh start every day.

Popularity: 1%


Written by Steve Wiseman. Read more great feeds at is source WEBSITE
no comments.
Read more articles on software.

Related articles

No comments

There are still no comments on this article.

Leave your comment...

If you want to leave your comment on this article, simply fill out the next form:




You can use these XHTML tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong> .