1

I have a late 2012 iMac. I use to shut it down with the shutdown command, in order to be able to delay the shutting down.

Here's how I use it:

sudo shutdown -h +30         # shuts down in 30 mins
sudo shutdown -h 04:00       # shuts down at the next 04:00 AM
sudo shutdown -h 1304302100  # shuts down on 04/30/2013 at 09:00 PM

I noticed that the latter two options don't work every time for me. Since I'm sure I entered the right time/date, what could prevent my Mac from shutting down? I set it to never go into stop, and to lock the screen after 30 mins of inactivity.

I'm on 10.8.3.

Little edit

Just a few minutes after I wrote this question, my Mac shut down unexpectedly (where I am now it was 03:40 PM. I never set this time anywhere. Yesterday night I set it to shutdown -h 04:00 and it was about 03:00AM. This is becoming strange.

Little edit #2

After suggestions from the comments, I looked at system.log and I found this (where ironmac is my user - original uh? - and Andreas-iMac is the name of my computer).

Apr 30 02:33:28 Andreas-iMac.local sudo[32613]:  ironmac : TTY=ttys000 ; PWD=/Users/ironmac/Dropbox ; USER=root ; COMMAND=/sbin/shutdown -h 04:00
Apr 30 15:41:26 Andreas-iMac.local shutdown[32620]: halt by ironmac: 
Apr 30 15:41:26 Andreas-iMac.local shutdown[32620]: SHUTDOWN_TIME: 1367329286 508163

You can see the shutdown command was received and scheduled, but the shutdown time seems to be random.

4
  • From the man page " At shutdown time a message is written to the system log, containing the time of shutdown, the person who initiated the shutdown and the reason." what does you log show?
    – mmmmmm
    Commented Apr 30, 2013 at 14:06
  • Also, you may have several shutdown processes running in addition to the energy saver scheduled events. I'd run a ps-ef | grep shutdown to be sure you don't have colliding events and multiple commands in flight to power down your system.
    – bmike
    Commented Apr 30, 2013 at 15:23
  • @bmike the ps -e | grep shutdown was the very first thing I did, and I found no processes willing to shut down my machine. Note that I don't have any energy-saver scheduled events: I just have set up my Mac to never sleep. Commented Apr 30, 2013 at 17:22
  • @Mark that is interesting indeed. I'm reading it right now, and I edited the question posting the content of the log too. Drop an eye there if you have time! Thank you. Commented Apr 30, 2013 at 17:26

0

You must log in to answer this question.

Browse other questions tagged .