How to schedule Windows Server 2008 to restart automatically once a week?

Tim Grier
Tim Grier used Ask the Experts™
on
I have a client with a DELL server running Windows Server 2008 R2.
We are managing it via ConnectWise Automate v12
I want to schedule the computer to restart every Sunday at 1AM.
How is it best to do this? Via a Scheduled Task on the server or via CWA?
And which ever is best, how do I configure it to do so?
Thanks in advance.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Technology and Business Process Advisor
Most Valuable Expert 2013
Commented:
I would just create a batch file with SHUTDOWN -R -T 60 as the only line.  Schedule it for 1 minute before you want it to restart using the Task Scheduler.  (In fact, that's what I've done for an RDS server at one client).

FYI, -R = Reboot (vs. -S which is Shutdown), -T is a time until executed.  Run SHUTDOWN /? for a more detailed explanation.
Tom CieslikIT Engineer
Distinguished Expert 2017

Commented:
I think is good to add -F on the end   (FORCE)

SOmetimes some OS shutdown require to use / switch instead of -

You must check,,, just type shutdown in your CMD window and check what switch your server command accepting

if is /

use:   shutdown /r /t 60 /f

if is -

use: shutdown -r -t 60 -f

Save in BAT file and create schedule task.
Lee W, MVPTechnology and Business Process Advisor
Most Valuable Expert 2013

Commented:
/f is unnecessary when /t is provided with a value greater than 0.  If you run shutdown /? and look at the info for /t:

Help on /t
Tim Grierowner

Author

Commented:
Thanks guys! Created the batch file, saved it and scheduled it on the server.
BTW Tom, my server used the / and not the - as you had mentioned.
Have a great weekend!!
Lee W, MVPTechnology and Business Process Advisor
Most Valuable Expert 2013

Commented:
Never seen shutdown have a problem with - as an option.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial