Create:
Creating a launchd configuration file might seem daunting when one hears about it but it really is easier than one first imagines it to be. In Lingon you can just choose New and then choose My Agents if you are not sure about the three options. Then just fill out each of the three steps. In step three (When) you choose more than one option but usually it only makes sense to use one.You can find out more about launchd and the changes to it in Leopard by watching a talk held by the developer of launchd: link
This is not the place to include a full tutorial and guide on how to write a configuration file for launchd but I can recommend that you first take a look at the man-pages that are linked in the Help-menu and then there are links where you will find more information:
http://developer.apple.com/macosx/launchd.html
http://www.afp548.com/article.php?story=20050620071558293&query=launchd
http://www.macgeekery.com/tips/all_about_launchd_items_and_how_to_make_one_yourself
http://data.scl.utah.edu/fmi/xsl/stream/details.xsl?-recid=200&a::v=EyaO944i72
http://www.macgeekery.com/tips/some_launchd_recipes
http://en.wikipedia.org/wiki/Launchd http://www.mactech.com/articles/mactech/Vol.21/21.06/launchd/index.html
View:
The folders where the configuration files exists are:My Agents - <your home folder>/Library/LaunchAgents
Users Agents - /Library/LaunchAgents
Users Daemons - /Library/LaunchDaemons
System Agents - /System/Library/LaunchAgents
System Daemons - /System/Library/LaunchDaemons
The difference between an Agent and a Daemon is (to put it over-simplified) that a Daemon runs when the system starts up (and generally runs as root) and an Agent runs when someone logs in.