Link to home
Avatar of Tim Grier
Tim GrierFlag for United States of America

asked on

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

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.
ASKER CERTIFIED SOLUTION
Avatar of Lee W, MVP
Lee W, MVP
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
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.
/f is unnecessary when /t is provided with a value greater than 0.  If you run shutdown /? and look at the info for /t:

User generated image
Avatar of Tim Grier

ASKER

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!!
Never seen shutdown have a problem with - as an option.