Options

scheduling shutdowns

mark_s0mark_s0 Member Posts: 82 ■■■□□□□□□□
Hi all,

The company I work for are currently trying to gain some kind of energy efficiency ISO accreditation to try and lower power costs, paper wastage etc..

One of our objectives set by our COO is to lower power costs by turning off pc's overnight. We have a number of what we call General Access pc's (we're an education institute) and we are looking to have them automatically shutdown at midnight.

I was wondering if any of you have this sort of thing implemented and how you went about doing it? Whether you used scripting or certain software?

What we are trying to achieve is to shutdown but have the user be prompted 10mins before and hopefully supply a desktop icon to allow the user to abort the shutdown if need be.
We were looking at using schtasks.exe and the shutdown command as a start but we're finding that creating a customised prompt isn't working because the comment needs to be put in speech marks and because the task itself has to be put in speech marks it's not recognising the comment causing the task to fail.

i.e.

schtasks.exe /various switches/ /TR "c:\windows\system32\shutdown.exe -s -t 600 -f -c "comment goes here""

This will not work because of the speech marks put in the -c switch. This was something we were hoping to put in a logon script.

This isn't something i've ever done before so the above might seem a silly way of doing it.

Any thoughts? I'd be interested to hear how you guys are implementing this sort of thing.

Mark

Comments

  • Options
    DevilsbaneDevilsbane Member Posts: 4,214 ■■■■■■■■□□
    I actually used a command like that for a small lab I was maintaining. I found no use to have them on at midnight. And then the user can just turn it back on the next morning.

    Do you really need a comment? If it is scheduled to go off at 8PM, and all of the users leave at 6, then nobody will ever see the comment anyway. Just educate your users on the new policy. Give a generous amount of time (5-10 mins+) so that they have time to save if for some reason they are still working. Also educate them about the shutdown -a command (to abort the shutdown) just in case they are staying late to do some work. (You could even create a batch file for the shutdown -a command and stick it on all of their desktops, but again, educate the users on what it is good for.

    Otherwise, you can just create a scheduled task to run a batch command that then points to the %logonserver% to run a script. That way your script is centrally managed, so if you decide 10 minutes isn't long enough, it is a quick fix. Plus your -c "gnkgnsjkfgns" would work.

    So schtasks.exe /various switches /TR [URL="file://\\%logonserver%\start.bat"]\\%logonserver%\start.bat[/URL]

    Then start.bat will be something along the lines of shutdown -s -t 600 -c "Your computer is restarting. Run shutdown -a to abort.
    Decide what to be and go be it.
  • Options
    phoeneousphoeneous Member Posts: 2,333 ■■■■■■■□□□
    Yeah, just use scheduled tasks to run a batch file with the shutdown parameters. I worked at a bank and we used this to shutdown teller stations, worked great.
  • Options
    forkvoidforkvoid Member Posts: 317
    Look into products made by Faronics. They deal mainly with educational institutions, and have a product geared specifically at this, called PowerSave.

    As an educational institution, you would also be interested in Deep Freeze for different reasons.

    Power Save - Intelligent PC Power Management for Windows and Mac Computers

    I have used DeepFreeze since 2003 and have nothing but the best things to say for it. I have not used PowerSave, but if the quality is anything like DeepFreeze, I expect it to be quite good.
    The beginning of knowledge is understanding how little you actually know.
  • Options
    SilentsoulSilentsoul Member Posts: 260
    We use a program by the name FOG
    FOG - A Free Cloning Solution | Download FOG - A Free Cloning Solution software for free at SourceForge.net
    it is an open source project.

    We use it for imaging but if you use it to its full potential by installing their service you can use the server to do all kinds of handy things.
    * Auto Log Off (0.16)
    * Hostname Changes
    * Active Directory Integration
    * Directory Cleaner (0.16)
    * Display Manager (0.16)
    * Green FOG (0.16)
    * Host registration
    * Task Restarting
    * Snapin Installation
    * User Tracker
    * Printer Manager
    * User Cleanup (0.16)
    * Client Updater
    * User Tracker
    Can't beat it, The "Green Fog" will allow you to choose multiple times at night to reboot or shutdown machines.
    If you need an image solution and want some cool features it is the way to go.
  • Options
    dynamikdynamik Banned Posts: 12,312 ■■■■■■■■■□
    Can't you escape your quotes for the -c switch (i.e \")?
  • Options
    aordalaordal Member Posts: 372
    SCCM R3 is coming soon if you guys are interested in all the features that come with it including power manager you should check it out. Here is the quick and dirty on the new release.

    Announcing System Center Configuration Manager 2007 R3 - Nexus SC: The System Center Team Blog - Site Home - TechNet Blogs
  • Options
    mark_s0mark_s0 Member Posts: 82 ■■■□□□□□□□
    Devilsbane, i'm with you on the educating the users idea, I was also thinking about keeping an information sheet next to the public access machines for general use, wifi keys etc. but could include the shutdown warning.

    Dynamik, you're right, the escape thing worked for the script I was using. I actually tried that earlier, but must have messed up the syntax and assumed it wasn't going to work. Thanks for your help!

    Forkvoid, thanks for your suggestions, i'll look at the PowerSave solution tomorrow as I know that Deep Freeze has been mentioned before for other things.

    Silentsoul, thanks for your suggestion and the price is right up our street, unfortunately my knowledge of linux is next to nothing and i'd rather be confident in using it before trying to implement a solution using it.

    Many thanks all!
  • Options
    ElwoodBluesElwoodBlues Member Posts: 117
    forkvoid wrote: »
    Look into products made by Faronics. They deal mainly with educational institutions, and have a product geared specifically at this, called PowerSave.

    As an educational institution, you would also be interested in Deep Freeze for different reasons.

    Power Save - Intelligent PC Power Management for Windows and Mac Computers

    I have used DeepFreeze since 2003 and have nothing but the best things to say for it. I have not used PowerSave, but if the quality is anything like DeepFreeze, I expect it to be quite good.

    X2
    I use Deep Freeze as well. I use it for booting the PCs (WOL) as well.
  • Options
    wd40wd40 Member Posts: 1,017 ■■■■□□□□□□
    We use nightwatchman

    NightWatchman PC Power Management remotely powers down PCs & Macs

    I'm not involved with administration so I can not give you more details.
Sign In or Register to comment.