Results 1 to 10 of 10
  1. #1


    Member Since
    Oct 23, 2012
    Posts
    2
    A question of pmset
    Hi,

    Firstly, great forum and I hope you guys can help!

    I have several suites of macs running at a college. I want to shutdown all the macs at night as the students tend to leave them running. So far I have used the following command in terminal;

    Code:
    pmset repeat shutdown MTWRF 21:00:00
    So, at 9pm each weeknight the macs will shutdown, fine. The problem however is that they tend to leave software running which then halts the shutdown, is there any way to force the macs to kill all the running software through pmset or should I be doing this another way?

    I'm happy for anything open to be lost as basically they should have saved it.

  2. #2

    vansmith's Avatar
    Member Since
    Oct 19, 2008
    Location
    Toronto
    Posts
    19,782
    Specs:
    2012 13" MBP (2.5 i5, 8GB)
    I wonder if cron might be a better solution here. I only suggest this since, with cron, you could use the shutdown tool to halt the machine which, at least in Linux (so I imagine it's the same in OS X), is ruthless and waits for nothing to close. Are you familiar with cron?
    Important Links: Community Guidelines : Use the reputation system if you've been helped.
    M-F Blog :: Write for the blog
    Writing a Quality Post

  3. #3

    docx's Avatar
    Member Since
    Apr 30, 2012
    Location
    Wales, UK
    Posts
    415
    Specs:
    I Mac 27-inch 3.2 GHz Intel Core i5 24GB ram. MacBook Pro 13-inch 2.5GHz dual-core Intel i5 16GB ram
    Why don't you schedule them to shut down at a certain time.
    Preferences>Energy Saver >Schedule.

  4. #4

    vansmith's Avatar
    Member Since
    Oct 19, 2008
    Location
    Toronto
    Posts
    19,782
    Specs:
    2012 13" MBP (2.5 i5, 8GB)
    Haha, this might have been an instance of over thinking this on my part. That should work as well.
    Important Links: Community Guidelines : Use the reputation system if you've been helped.
    M-F Blog :: Write for the blog
    Writing a Quality Post

  5. #5


    Member Since
    Oct 23, 2012
    Posts
    2
    Cool
    Cheers for your fast responses!

    Docx, the problem with the energy saver is that it basically calls pmset so still will not shutdown if any software is running. The reason I used the terminal command is that it does not appear in the energy saver control panel so can't be altered by users!

    Vansmith, I have not used cron at all but Iíll have a look at it, cheers.

  6. #6

    vansmith's Avatar
    Member Since
    Oct 19, 2008
    Location
    Toronto
    Posts
    19,782
    Specs:
    2012 13" MBP (2.5 i5, 8GB)
    Take a look at cron. I use it to run a few things on a schedule and it works really well. With cron, you can also (as noted) use the shutdown tool to halt the machine which won't care if something is running (which appears to be what you want to accomplish).

    Here's a nice cron tutorial on the Ubuntu wiki.
    Important Links: Community Guidelines : Use the reputation system if you've been helped.
    M-F Blog :: Write for the blog
    Writing a Quality Post

  7. #7

    Mark FX's Avatar
    Member Since
    Aug 13, 2011
    Location
    West Sussex, UK
    Posts
    187
    You could also build a stay open Applescript application, that runs in the background, and checks the
    current system time every few minutes, and then closes all running apps when 9pm roles around,

    I'm no Applescript expert, but I could post some code if your interested in that kind of solution.

    Regards Mark

  8. #8

    vansmith's Avatar
    Member Since
    Oct 19, 2008
    Location
    Toronto
    Posts
    19,782
    Specs:
    2012 13" MBP (2.5 i5, 8GB)
    The only problem with an AppleScript solution is the ease with which it can be stopped. Any student at a machine could stop/quit an AS, thus precluding the shutdown process from ever happening.
    Important Links: Community Guidelines : Use the reputation system if you've been helped.
    M-F Blog :: Write for the blog
    Writing a Quality Post

  9. #9

    Mark FX's Avatar
    Member Since
    Aug 13, 2011
    Location
    West Sussex, UK
    Posts
    187
    Good Point.

  10. #10

    Mark FX's Avatar
    Member Since
    Aug 13, 2011
    Location
    West Sussex, UK
    Posts
    187
    Yes that is a possible problem, but I would have the app well hidden in a location that only
    a system admin could access, and have it set up to start automatically when the computer starts.

    But point taken, just an alternative though.

    Mark

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. PMSET Settings
    By rkraposa in forum OS X - Operating System
    Replies: 0
    Last Post: 02-27-2013, 12:17 PM
  2. Hardware Question + Linux Question
    By Sir Edwin CBE in forum Running Windows (or anything else) on your Mac
    Replies: 0
    Last Post: 11-20-2007, 11:53 AM
  3. Boot-Up Question Mark Folder Impending Doom Question.
    By bingwalker in forum OS X - Operating System
    Replies: 3
    Last Post: 07-10-2007, 05:19 AM
  4. Airport Question & Program Default Question
    By vicariousgeorge in forum Switcher Hangout
    Replies: 1
    Last Post: 03-01-2007, 11:13 PM
  5. Pmset
    By MadSkillzMan in forum Switcher Hangout
    Replies: 0
    Last Post: 06-11-2005, 04:56 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •