I\'m trying to get familiar with cron jobs, and I think I get the basic idea (scheduling, syntax, etc), But, I can\'t seem to get it right on my mac with Terminal - where ex
To get started with launchd (instead of cron) you'll want to first create an empty .plist file, for example local.mytask.plist and put it somewhere. ~/Library/LaunchAgents is probably a good place. Open that in text editor and copy in the code below
KeepAlive
Label
local.mytask
ProgramArguments
/opt/local/bin/wget
http://someserver/somepage.php
StartInterval
300
RunAtLoad
StandardErrorPath
/dev/null
StandardOutPath
/dev/null
Then "activate" the file from the command line:
sudo launchctl load /Users/my_username/Library/LaunchAgents/local.mytask.plist
To make it load automatically, create a ~/.launchd.conf file with the same line (minus sudo launch)
load /Users/my_username/Library/LaunchAgents/local.mytask.plist
The above instructions above have been copied from www.davidlanier.com and reposted here for your reference.