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 looking for something special : here is a windows server that is used for development by 4/5 people remotely working on it through remote control.

I'm installing Visual Studio 2010 on it, and the installation won't continue until the server has been restarted. I'm looking for a way to reboot when the server is idle (when nobody is connected through remote desktop on it) so that the reboot doesn't bug anyone.

Is there some software that can do that ?

Thanks !

share|improve this question
6  
This is what the professional world calls a maintenance period where the resource is simply unavailable. Give your users a heads up you need to restart the box and then do so. Its not that big of a deal, and happens every day. Hell you could do it during the day given enough end-user notification warning. –  Brent Pabst Sep 11 '12 at 11:48
1  
Forgetting the reason given for asking this question, I think this question should not be closed, as a technical answer to how to achieve this is potentially valuable. –  dunxd Sep 11 '12 at 14:48
1  
I alredy talked to the devs using the computer. Indeed, dunxd, I'm looking for a technical reason, not a social engineering one. –  RitonLaJoie Sep 11 '12 at 15:18
    
Sometimes, "Don't do that" is the right answer. –  Michael Hampton Sep 11 '12 at 16:32
1  
@SteveG It isn't the correct solution since the question was to restart the server when no one is connected. You can't always solve a problem by reinterpreting the question. I'm sure tons of system admins have scheduled downtime, and that's fine, but that isn't what OP wants to do. –  KyleM Sep 11 '12 at 21:47
show 1 more comment

3 Answers 3

Here's a script:

  1. Find out what time none of the developers are likely to be logged in. For this example we will use 3 am through 7 am as the time that no developers are expected to be logged in.
  2. Email the developers and inform them the server will be rebooted at 3 am.
  3. Reboot the server at 3 am.
share|improve this answer
    
The devs let their session open to run things that takes a long time. Typically, if such a session exists, the dev will let it opened at night.. –  RitonLaJoie Sep 11 '12 at 12:18
2  
If they left a process going during a maintenance window when a reboot was scheduled, it's their fault. Reboot it anyway. –  Michael Hampton Sep 11 '12 at 12:32
    
Wait, you're trying to keep dev's happy?! BOFH! –  HaydnWVN Sep 12 '12 at 10:15
add comment

You could probably script this in either Powershell or Batch and then run a scheduled task every 5 minutes to check and then reboot if possible. Try the command "quser". But you'll need to test this etc.

So, with that said, you have 5 users. Just tell or ask them - you're far more likely to bug them by suddenly bouncing the server as they're about to log on, or if they've just logged off for a minute.

Also, make sure you check for disconnected sessions and not just active users

share|improve this answer
add comment

This is one of those situations when you doing your job disrupts someone else doing theirs and vice versa.

Sure you could burn many hours trying to figure out a technical solution, but talking to each other and finding a suitable time will be cheaper and more easy to sustain in future.

If they really need zero downtime, then you need to know so you can invest in that, since there may also be costs related to unplanned outages that are unacceptable. If they aren't bothered about that, then they should not be demanding you don't do your job!

share|improve this answer
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.