how to write a dos batch file which will be called from startup to reboot windows 2003 terminal server.

I have a windows 2003 server that I want to safely restart every 48 hours. I want to use the start menu to call the batch file because the scheduled tasks feature on the server does not work for some reason.

How do I do this?
Dana DIT ConsultantAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

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.

Chris HInfrastructure ManagerCommented:
Open task scheduler in control panel.

Set a scheduled task to run the following in a batch file:

shutdown /f /r /t 30

Open in new window

make sure when you set the scheduled task, you set it to run with an administrator account who has permission to reboot the box.
Dana DIT ConsultantAuthor Commented:
As I mentioned task scheduler is broken on the server for some reason so I need a method that uses start menu or some other way.
Chris HInfrastructure ManagerCommented:
shutdown /f /r /t 30

Open in new window

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
10 Tips to Protect Your Business from Ransomware

Did you know that ransomware is the most widespread, destructive malware in the world today? It accounts for 39% of all security breaches, with ransomware gangsters projected to make $11.5B in profits from online extortion by 2019.

Dana DIT ConsultantAuthor Commented:
choward16980 thank you for you response. But I have a question. If I add this bat file to the windows startup menu does the administrator need to logon before it will initiate the bat file?
Chris HInfrastructure ManagerCommented:
Yes.  If that's out of the question, you're out of options.
Dana DIT ConsultantAuthor Commented:
ug ok thank you for your help!
Chris HInfrastructure ManagerCommented:
You can issue the command remotely from another server.
Dana DIT ConsultantAuthor Commented:
yes I think I will have to do that. thanks!
Dana DIT ConsultantAuthor Commented:
Thank You!
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
Windows Server 2003

From novice to tech pro — start learning today.