1. Batch Processing + scheduled task plan:
(1) first write a batch processing file, such as shutdown. bat, and place it in a suitable folder, such as c: \ shutdown. bat. Its content is:
Shutdown-r-F-T 20
(2) Add a new plan (for example, shutdown) to the control panel-task plan. job), enter the batch processing path in the task running column, for example, C: \ shutdown. bat, set relevant parameters (such as scheduled time and permission settings ).
2. Direct batch processing operation method:(Replace the followingCodeCopy and save it to a batch processing file, for example, C: \ shutdown. BAT)
@ Echo off
Echo ┌ ── ─
Echo │ timed restart of Windows Server │
Echo │ ------------------------------------------------ │
Echo │ platform: w2k/w2k3 tested │
Echo └ ── ─
ECHO is setting ......
At 4: 00/every: M, T, W, Th, F, S, Su shutdown.exe/R
Echo settings are complete. Press any key to exit ......
Pause> NUL
Run the batch in "start-> Run.
Note: The above at command can be entered in "start-> Run" cmd, and then enter the command at/? In the DOS (black window /? View more details.
3. IIS startup method:
Use iisreset.exe/reboot to implement the task as follows:
start -- control panel -- schedule the task, click Add scheduled task
In browse Program , select c: \ windows \ system32 \ iisreset.exe, and then select daily, set related parameters.
after the task is added, click the properties of the task and enter
C: \ windows \ system32 \ iisreset.exe/reboot
in the running state.