Automating Tasks in OSX

This is lifted from my old research blog, but I find myself looking it up so often that I'm reposting here to make it easier to find. Click the post title to view the full article::

Since 10.4 the new way to set startup tasks is through the use of launch agents or launch daemons (launchd). These can be easily controlled with the launchctl service, here's the manual page:
http://developer.apple.com/mac/library/documentation/Darwin/Reference/M…