While MacOSX is bsd based, coming from a unix/linux background you would automatically look
for cron to schedule your jobs and maintenance scripts.
However, MacOSX adopted launchd as a replacement for many tools including
init, rc, the init.d and rc.d scripts, SystemStarter (Mac OS X),inetd and xinetd, atd, crond and watchdogd (http://en.wikipedia.org/wiki/Launchd).
After a bad experience with cron on MacOSX in which I configured a job to run at 14
* 14 * * * * /myscript and instead of running once at 14 the script kept running and running
what definitely lead to other problems and server load averages increasing dramatically.
the trick was that I had to specify the minute of hour, so the line in crontab -e would look
0 14 * * * * /myscript, that ran the script once properly.
A more neat and Macky way to do it is using launchctl, a tool that makes things easy
is lingon by Peter Borg http://lingon.sourceforge.net/.
.... to be continued
No comments:
Post a Comment