Tuesday, September 22, 2009

Scheduling jobs on OSX

Hello,

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

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

Followers