Three methods for timed server restart

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.