To make the site faster and eliminate unused system resources, we want the win2003 server to automatically reboot at midnight every day, which can be accomplished using the Scheduled Tasks feature in Win2003.
Methods and steps:
1, A new text file, the contents of the file is :
Shutdown-r-T 30
The file is then saved as reboot. cmd and stored in the C:\ root directory.
2, Open the task plan under the Control Panel, double-click the Add Task plan, always point to the Next button, until the next picture appears:
Click to browse ... button, select the file you just saved in C:\reboot.cmd .
In the above figure again choose every day, and then click Next;
Here you can set the starting time, I am here is set to the Wee 4, and then click the Next button, appear in the following figure:
Enter the server's super username and password here, and then click the Next button, until you're done. This set up the server in the early morning4, will automatically restart.
Shutdown usage : shutdown-l |-S |-r |-a-f-M \\computername-t xx-c "comment"-Dup:xx:yy
No parametersDisplay this message(And?Same)
-I.ShowGuiInterface, must be the first option
-LCancellation(cannot be associated with an option-MUse together)
-STurn off this computer
-RShutdown and restart this computer
-AAbort system shutdown
-m \\computername remote computer shutdown / restart / abort
-t xx set timeout for shutdown is xx sec
-c "comment" Closes the note ( maximum 127 ) -f
The forced application shutdown without warning
-d [u][p]:xx:yy Close Reason code
u is user code
p &NBSP is a planned shutdown code
xx is a primary reason code ( less than 256 Positive integer )
yy is a minor reason code ( less than 65536 positive integer )