Link to home
Start Free TrialLog in
Avatar of Dana D
Dana D

asked on

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?
Avatar of Chris H
Chris H
Flag of United States of America image

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.
Avatar of Dana D
Dana D

ASKER

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.
ASKER CERTIFIED SOLUTION
Avatar of Chris H
Chris H
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Dana D

ASKER

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?
Yes.  If that's out of the question, you're out of options.
Avatar of Dana D

ASKER

ug ok thank you for your help!
You can issue the command remotely from another server.
Avatar of Dana D

ASKER

yes I think I will have to do that. thanks!
Avatar of Dana D

ASKER

Thank You!