Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to shut down a Mac every night at 10:00 pm. Does Mac have a scheduler that I should use, or should I defer to cron? I'm a Linux user, this was a question asked to me by a friend. I'd like to be able to insert the command from a terminal like I would in Linux:

crontab -e 


(crontab -l >/dev/null 2>/dev/null && (crontab -l && echo "@reboot do-stuff") | crontab -)

What's the best option for doing something from the command line? I'm not exactly too familiar with OSX.

share|improve this question
up vote 5 down vote accepted

cron is there for compatibility, but it has been superseded by launchd, which does indeed have the ability to schedule events. You need, in your property list file, a StartCalendarInterval key with a value that is a simple a Hour/Minute pair:

share|improve this answer
Although using cron is still perfectly fine. – slhck Sep 1 '11 at 20:32
Hooray for cron! – Naftuli Tzvi Kay Sep 1 '11 at 22:14

pmset is the command line utility for the system preferences energy saver schedule section.

sudo pmset repeat shutdown MTWRFSU 22:00:00

GUI at Apple menu > System Preferences... > Energy Saver > Schedule (button)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.