3

Is there a way of making all the computers in our domain/environment go to sleep after say, 8PM and wake up at 7AM in the morning?

I understand that this may need some sort of application for the server to communicate with but I believe this will not be so difficult with SCE and due to the fact that we only have about 10 PCs in the office.

5
  • 1
    I would worry about what if somebody is doing business-critical work at 8pm and their machine starts going to sleep. And don't just give users 60 seconds to cancel this going to sleep. And yes, I do have bitter experiences of this. Jul 4, 2010 at 19:36
  • This is a good point Kaerast but I was planning on making it so the computer only goes to sleep after it has been idle for some time (I think half an hour is generous) - you can do this in the task scheduler within Windows :)
    – emtunc
    Jul 4, 2010 at 19:46
  • If the user leaves at 4, do you care if the PC sleeps at 4:30? Just set the power settings on the machine .. they can be controlled via GPO.
    – tomjedrz
    Jul 4, 2010 at 20:03
  • While we do love guessing games it just might be slightly helpful to tell us what OS we are talking about. There is no one-size-fits-all answer. Jul 4, 2010 at 22:06
  • Should have mentioned that in my original post sorry. Environment is made up of 2 SBServers 2003 and about 10 Vista/7 machines.
    – emtunc
    Jul 5, 2010 at 6:06

3 Answers 3

4

The particular details depend on the OS they are running but the basics are the same -- and simple.

shutdown -- a scheduled task is run on each machine at the appropriate time that calls the shutdown command for a clean halt. Use job scheduler or cron, whichever is the one you have.

wake up -- all machines will have to support Wake on LAN (WOL) and have it enabled. One machine has to stay up to send the WOL packets to the others at the appropriate time. The waker machine executes a scheduled task to do this. Note that currently WOL only works for wired networks.

There are several places on the net where you can get a WOL utility. It's fairly simple to write one yourself.

4
  • Thanks for that, I didn't think of using the WOL feature of the network cards :) I will play around with some tools on the SBS 2003 and see if I can get it to work :)
    – emtunc
    Jul 4, 2010 at 17:56
  • Search for "wolcmd" if you're looking for a simple command-line Wake-on-LAN tool. Of course, you will need to enable WOL in the BIOS settings of each machine.
    – Skyhawk
    Jul 4, 2010 at 19:40
  • Also, Task Scheduler allows you to set a task to run only if a machine has been idle for a certain number of minutes. This may be a good way to avoid "surprise shutdowns" for people who are working late in the evening.
    – Skyhawk
    Jul 4, 2010 at 19:41
  • If using the Windows shutdown command, you would normally leave a countdown before shutting down (I normally give 10 or 15 minutes) and a message on the screen that can let the user know that if they enter shutdown -a it will abort the shutdown and let them carry on working.
    – GAThrawn
    Jul 5, 2010 at 12:28
1

A lot of PC BIOS's have the capability to set timed wake-ups, that's worth looking into. If your machines are business models from one of the big vendors (eg Dell, HP) you'll probably find there's even a tool you can use to automate switching this on in the BIOS without having to visit each machine and boot into BIOS setup.

For the shutdown you could just set a scheduled task to run shutdown -s at the specified time.

2
  • Good point... I'll check it out tomorrow! My first question and I've learnt quite a bit already :)
    – emtunc
    Jul 4, 2010 at 19:43
  • The scheduled wake feature is not that common. If you rely on this feature now then if, in the future, any of your additional or replacement machines are from different manufacturers or even different versions of the same device that do not include that feature you will have big problems.
    – Allen
    Jul 4, 2010 at 20:05
0

Assuming Windows XP ...

1- I don't think there is any easy way to automatically sleep the computer, but you can use the shutdown command to hibernate the computer ... shutdown /h. Put it in a batch file and set a scheduled task.

2- I have found Wake-on-LAN to to be a lot of trouble. Generally, the BIOS and the NIC have to be set to enable WoL, and I have found that some NICS/PCs wil wake up on other traffic than WoL packets. I would avoid it if the idea is solely to have the PCs alive when people arrive; restarting from sleep/hibernation is pretty fast.

3- If there is a Windows domain I believe that shutdown/sleep/hibernate and wake-up/startup can be controlled through Group Policy, or at the very least the scheduled settings and scripts can be automatically deployed.

4- Although sleep/hibernate are pretty good at not losing data, I would make sure that Office app autosave settings are enabled, just in case. For Microsoft products, these can be controlled via GPO as well.

1
  • Actually it's pretty simple putting the computer to sleep on XP (and probably the same way on Vista/7). You just put the following in the 'run' section and you're set: C:\WINDOWS\system32\rundll32.exe powrprof.dll,SetSuspendState
    – emtunc
    Jul 4, 2010 at 20:09

You must log in to answer this question.

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