Schedule a Mac to Startup via Command Line with pmset

Nov 28, 2009 - 5 Comments

Scheduling a Mac to startup at a specific time via the command line

Most Mac users who want to schedule a Mac to startup at a specific time will use the Energy Saver schedule tool in System Preferences, but for the more technically savvy, another option is to schedule the boot time of a Mac through the command line.

We’ll show you how to use the pmset command to schedule a Mac to boot up (or wake from sleep), this is a great tip and I use it to get my Mac to boot before I get to the office, reducing the time necessary to wait to use the computer.


To accomplish this, I used this command syntax with pmset:

pmset repeat wakeorpoweron MTWRF 07:45:00

This tells the Mac to either wake or boot (depending on it’s current state) every Monday through Friday at 7:45am.

You can clear this type of repeat schedule by typing the following:

pmset repeat cancel

That will clear out any set boot and wake schedule, allowing you to set a fresh schedule if desired.

Note that you can do all of this through the Energy Saver GUI, which is an easier approach for people who are less comfortable in the Terminal. The main advantage to learning to use the pmset command via the command line though is that you can schedule these events remotely from anywhere just by using SSH to remotely access a Mac.

Enjoy this tip? Subscribe to the OSXDaily newsletter to get more of our great Apple tips, tricks, and important news delivered to your inbox! Enter your email address below:

Related articles:

Posted by: Bill Ellis in Command Line, Mac OS X, Tips & Tricks

5 Comments

» Comments RSS Feed

  1. Alex says:

    I keep seeing articles concerning the “Command Line” such as this article. Could you clear up a question that bounces around my gray matter everytime I see some one mention the “Command Line”.

    Is it a the Terminal or is it something completely different and if so where is it?

  2. Ben says:

    Alex,
    Worry not. The “Command Line” and “Terminal” are synonymous terms for typing anything into the Terminal.app. Technically, the Terminal is your Terminal application, while a command line is anything typed into the terminal application (usually on only one line of code, hence the name.)

    You can reach the terminal by opening your Applications folder from the Finder:
    Go > Applications > Utilities > Terminal

    Hope this helps!

  3. warmz says:

    Everyday can be expressed as ‘MTWRFSU’ :)

    What you work on weekends? .. go out and hv some fun instead ;)

  4. Design Ideas says:

    Something new for me :)

  5. Geoff says:

    Is there a way to set a varying schedule? If I want my computer to start up at 3:00 PM on Monday, 4:00 PM on Tuesday and Wednesday, 2:00 PM on Thursday, and 8:00 AM on Friday and Saturday, is there a way to do that?

    Also, what is the terminal command to set the shutdown time?

    Many thanks!

Leave a Reply

 

Shop for Apple & Mac Deals on Amazon.com

Subscribe to OSXDaily

Subscribe to RSS Subscribe to Twitter Feed Follow on Facebook Subscribe to eMail Updates