In OS X 10.7 the launchd process is the process that kicks off all processes and launches launch daemons and launch agents. This effectively is what cron and cronjobs are to the general Unix/Linux environment
Launch Daemons are typically system process whereas Launch Agents are processes that can be run by users.
Launch Daemons are found in 2 spots :
/Library/Launch/Daemons <<–3rd Party Daemons
/System/Library/Launch/Daemons <<–Apple Daemons
Launch Agents are found in 4 spots:
/System/Library/LaunchAgents <<–Apple supplied agents for all users
/Network/Library/LaunchAgents <<–Network Users via an automount
/Library/LaunchAgents <<–Third party agents for all admins
~/Library/LaunchAgents <<–Third party agents for all users
These files are plain text xml files or .plist “property list” files and are structured in value pairs, you can edit with a regular text editor or using Apple’s Property List Editor which comes in the Developer Tools: Developer/Application/Utilities, the files also have a reverse URL naming convention ie :
com.neilgee.mysuperbackup.plist
A native plist looks like this:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>com.neilgee.mysuperbackup</string> <key>ProgramArguments</key> <array> <string>/usr/sbin/ftpcpanel.sh</string> </array> <key>StartCalendarInterval</key> <dict> <key>Hour</key> <integer>10</integer> <key>Minute</key> <integer>17</integer> </dict> </dict> </plist>
And a view via the Property List Editor looks like this:
The one that applies to any 3rd Party automation for users is the agents filed in the users folder in:
~/Library/LaunchAgents <<–Third party agents for all users
And a great application for creating Launch Agents graphically is an app called “Lingon” by Peter Borg which allows you to create a new agent, name it, point to the command you want to run, set the frequency interval and set and forget.
So if you already have a script made for backups to download a cPanel backup from a remote host you can set when that script is run and the backup is launched.
In Lingon fill out the steps 1 2 and 3…