Create a Scheduled task to restart a server

Create a Scheduled task to have your server reboot at a scheduled interval. This works on Windows server 2003 and newer. I have not looked for a solution on Windows server 2000, because we do not have any in out network.

9 Steps in total

Step 1: Open the Task Scheduler

 

Open the Scheduled Task
START ->All Programs ->Accessorier -> System Tools -> Scheduled Tasks

Step 2: Create a new task

 

Double Click on the "Add a New Scheduled Task"

Step 3: Follow the Scheduled Task Wizard

Click "Next"

Step 4: Select the program to run

 

Click on Browse to select the proper program and location to run. Navigate to "C:\WINDOWS\System32\shutdown.exe"

Step 5: Select the Frequency

 

This is where you set how often you want to "task" to execute. So if you wanted your server to reboot weekly you select "weekly"

Step 6: Select the time and day you want the task to start.

 

This can be once a week at 3 AM or every Wednesday and Friday nights.

Step 7: Enter the username and password for a user

 

This is the user that the scheduled task will run as. I suggest using an account that has domain admin privileges.

Step 8: You have successfully scheduled the following task

 

At this point, you would be done, if you wanted the server to shut down at the scheduled time. We are going to select the Open Advanced options when I click finish. Then click Finish

Step 9: Advanced Options

 

In the Run option, you will see the location of the shutdown program. we are going to add some options.

-r This will have the server shutdown and then restart
-f This will force the server to force any running application to close
-t 01 This is a time-out before shutdown.

so the full run command is:
C:\WINDOWS\system32\shutdown.exe -r -f -t 01

Select Apply and then OK

You can also look at the scheduled tasks properties and change the schedule or frequency of the reboots.