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.
Tim GrierownerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Lee W, MVPTechnology and Business Process AdvisorCommented:
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.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Tom CieslikIT EngineerCommented:
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 AdvisorCommented:
/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 GrierownerAuthor 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 AdvisorCommented:
Never seen shutdown have a problem with - as an option.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.