Any ideas how to resolve the error that shows up in the Mac OSX system.log file? Or even what the error means?
I have the following cron job that runs every minute:
* * * * * cd /Library/[...]/report/ && nice -n 15 /usr/local/php5/bin/php -f report_generator.php > /dev/null 2>&1
Searches around the internet mentioning commenting out the cron job, but in my cause I can't do this. Most of Google's search results also don't have conclusive mention of what the error actually means.
The full error is:
Jul 2 14:50:00 xserve2 com.apple.launchd[1] (0x10c3f0.cron[46328]): Could not setup Mach task special port 9: (os/kern) no access
Mac OSX 10.5
Best Answer
I'm aware this won't quite fix the original issue but hopefully will tell us if the issue is a bug in
launchd
or something else.Have you tried removing the
cron
job and re-instituting it as a properlaunchd
job instead?launchd
is supposed to run thecron
jobs but it sounds like you may be running into a bug.You can create a
launchd
job using a GUI such as Lingon if you'd prefer instead of making the .plist yourself.Sample .plist:
From my Googling it sounds like it's a bug in
launchd
runningcron
jobs. Source: 1StartInterval will simply run it that many seconds from when the job was last run. StartCalendarInterval will allow you to run it at set times and instead of the
<key>StartInterval</key>
in the sample above use the following:Run only at 3:15 AM
Run every 5 minutes - StartCalendarInterval with an array. (I don't know of a better way to write this out so I'd love someone to elaborate on this)
For more check out the Migrating from cron section on the documentation for launchd and man page