launchd instead of
at, or other legacy UNIX tools for Mac OS X.
pmset is a built-in command line tool for getting and setting power related values on Mac OS X. One of pmset's abilities is to add and remove entries from the IOPMQueue; the IOPMQueue is the IOKit level queue that allows your Mac to power on and wake up at a specific time. IOPMQueue also supports scheduling of shut downs and restarts.
Arbitrary code can not be scheduled using pmset or through the IOPMQueue.
cron is a stalwart of the task scheduling world. However on Mac OS X, using cron is not recommended. Use
cron is implemented by checking each minute for tasks that are due. This allows for a powerful and expressive scheduling format but at the cost of needing to wake the processor up every minute.
cron does not know about your Mac sleeping. If a task is due while your Mac is asleep or powered off, the task will not occur. When your Mac powers back on, the task will not be performed because the minute in which it should have run has passed.
There are other tools that build upon cron and can run missed tasks upon waking. None are included by default with Mac OS X.
launchd (launch daemon) is Apple's system starter, scheduling tool, and process watchdog. launchd is written for the needs of the operating system first and users second. It is a powerful and capable process used to manage or launch almost every other process on your Mac.
launchd is an improvement on cron for scheduling because it does not need to poll to perform tasks. Instead launchd can remain inactive until the moment a task needs performing. In an era of energy aware and mobile computing, this is important.
launchd will not wake a sleeping Mac to perform tasks.
launchd job tickets are property list (plist) files. These files can be edited with a text editor or with a number of third party applications.
launchd is recommended for, and is suitable for, most scheduling situations.
There are number of third party scheduling tools available on Mac OS X. They often provide a graphical interface or offer more features than are included in the standard Mac OS X command line tools. The tool I am associated with is Power Manager.