4

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 !

6
  • 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. Sep 11, 2012 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, 2012 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. Sep 11, 2012 at 15:18
  • Sometimes, "Don't do that" is the right answer. Sep 11, 2012 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.
    – Kyle
    Sep 11, 2012 at 21:47

3 Answers 3

6

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.
3
  • 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.. Sep 11, 2012 at 12:18
  • 3
    If they left a process going during a maintenance window when a reboot was scheduled, it's their fault. Reboot it anyway. Sep 11, 2012 at 12:32
  • 1
    Wait, you're trying to keep dev's happy?! BOFH!
    – HaydnWVN
    Sep 12, 2012 at 10:15
5

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

4

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!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .