Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm after the correct way to schedule a reboot on an SBS2011/WS2008r2 box.

External support company created a reboot.bat file and added a scheduled task to run it at 6am every Monday morning.

reboot.bat contains:

shutdown -r -f

The batch executes correctly and reboots the server cleanly, yet upon reboot the Server is left with the following screen:

enter image description here

What is the best way to schedule this reboot?

This reboot is to solve performance problems due to running database reports on a Sunday afternoon. I am fully aware about the problems we have by running additional databases on an SBS box (if it were my choice we wouldn't be).

Similar questions, but none answer the Event Tracker problem: 1, 2, 3.

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

You should provide the /d option to give a reason for the shutdown in advance.

You can get a list of the reasons available to you by running shutdown /? in a terminal. However, given your scenario I'd use shutdown /r /f /d p:4:1 for "Application maintenance (Planned)".

share|improve this answer
    
Excellent thanks Falcon, have made the change but will have to wait until next Monday morning to check it's success! –  HaydnWVN Aug 19 '13 at 11:08
    
Am I correct in thinking that arguments in a batch file have to be used with a dash - rather than a backslash / ? –  HaydnWVN Aug 20 '13 at 9:08
1  
/ is a forward slash and is the traditional way of specifying arguments to windows command line programs. It should work regardless of context. Most things support - as well and in the case of this utility I believe they are completely interchangeable. –  Falcon Momot Aug 20 '13 at 9:26
1  
Ok thanks, tested here successfully, but not on a WS2008 machine (thankfully don't have any of them here!) ;) –  HaydnWVN Aug 20 '13 at 9:34
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.