Skip to content

Scheduled Tasks – launchd

For a long time I have used crontab for almost all scheduled tasks, with a few diversions into /etc/rc and other such Unix techniques. With Tiger, Apple created launchd, which is intended to unify these, as well as inetd and Apple’s previous (and largely ignored) attempt at the problem, StartupItems. Here are a few pointers on using launchd.

First off, take a quick look at Apple’s notes on launchd, Getting Started with launchd. This doesn’t actually tell you how to use it, but does contain a handy introduction. You ought also scan the man pages for launchd, launchd.plist and launchctl, which contain all the hoary details.

Now to get started in earnest, read the MacGeekery article and the follow up, and download Lingon. (The author of the MacGeekery article wrote an editor which is $5, but Lingon is free).

If you have read these, it is pretty much trivial to create your own cron (and rc and inetd) script replacements.

Post a Comment

Your email is never published nor shared. Required fields are marked *