2 Replies Latest reply: Oct 4, 2012 9:42 PM by HenryS
HenryS Level 2 Level 2 (295 points)

What is the best way to set up a regular power cycle of the Mac Mini when using it with Mountain Lion Server? Ideally, would like to schedule a weekly automatic shutdown of the hardware and restart of the Mini. Since running Server, I notice that prior to shutting down Server wants to get OK to shut down and send push notifications to clients.

 

Can I automate the process for a weekly power cycle of several clients (two of three) and the Server Machine, with Server, or even the previous method- System Preferences>Energy Saver?


Mac mini, OS X Mountain Lion, (3,1) 3GB RAM, 2GHz, C2D, JBOD Ext.
  • JaimeMagiera Level 2 Level 2 (305 points)

    Take a look at the "pmset" command. You may want to wrap it in a script that calls "serveradmin" as well, to do any service shutdown and cleanup before the restart.

     

    http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/ man1/pmset.1.html

     

    Just out of curiosity, why do you want to do this?

  • HenryS Level 2 Level 2 (295 points)

    JaimeMagiera wrote:

     

    Take a look at the "pmset" command. You may want to wrap it in a script that calls "serveradmin" as well, to do any service shutdown and cleanup before the restart.

     

    http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/ man1/pmset.1.html

     

    Just out of curiosity, why do you want to do this?

    Thanks for your comments, Jaime. The BSD (Linux) command seems suitable. How would it play into a server control script?

     

    My idea was to call the clients to shut down, shut down the server, power down the hardware. Next, wait 10-15 min. and power up the Server machine, then the clients (reversing the order) after the Server is alive and running. I hadn't planned any server cleanup at this time but it is obviously quite do-able.

     

    I find power cycle a VERY convenient way to flush many built-up slowdowns in the OS from the hardware. I try to do it once a week at off hours. Usually Monday morning (in the case of one client), or Sunday @ 12N (in case of the rest). I have a System Pref schedule on all the machines now, perhaps it could be scripted and called direct from the server machine instead?

     

    How would I go about this? ML Server does very few jobs for me now, simply being a file share manager at this time.