How to set the server to automatically restart, when is the setting appropriate?

  
                  

You can set it to restart between 3:05-3:55 in the morning, for example: 3:33, it is recommended to restart once a month.

There are no automatic tasks scheduled for this time period, and the server can be restarted during this time period.

Note that if you have set up an operating system to automatically install patches, you should stagger this time.

Restart You can use the scheduled task + batch to call the following command:

shutdown -r

You can use the operating system's scheduled task to call shutdown.exe -r to achieve , the method is as follows:

In the Start--Control Panel---Schedule Task, click Add Schedule Task

Select c:\\windows\\system32\\shutdown.exe in the browser, then select Every day,

After the addition is complete, click on the properties of this task, then enter

in the run C:\\WINDOWS\\system32\\shutdown.exe -r

Will take effect.

Copyright © Windows knowledge All Rights Reserved