cron on Mac OS X

cron on Mac OS X

by Robert Brenstein -
Number of replies: 2
I am surprised that the general installation instructions do not mention using curl instead of wget for Mac OS X. I have stumbled across this as quite a few other people, judging from forum posts going back to 2003.

Another thing that I stumbled across is that most people quote -O option for curl, which resulted in cron reportig an error

curl: (3) malformed

and passing me the output from cron.php. Further search of forums gave me an idea to use -o instead of -O and that fixed the problem. No error and no output from cron.php.

However, I am still getting email from cron every 5 mins, just reporting that it ran. I can't figure out how to turn it off. For example:

Subject: Cron curl -q -o /dev/null http://127.0.0.1/moodle/admin/cron.php
X-Cron-Env:
X-Cron-Env:
X-Cron-Env:
X-Cron-Env:
X-Cron-Env:
Date: Thu, 21 Apr 2005 13:05:02 +0200 (CEST)

% Total % Received % Xferd Average Speed Time Curr.
Dload Upload Total Current Left Speed
100 458 0 458 0 0 247 0 --:--:-- 0:00:01 --:--:-- 538


It is no fun having to delete a few emails each day. I am using OSX 10.3.8 if that matters.

Robert
Average of ratings: -
In reply to Robert Brenstein

Re: cron on Mac OS X

by Zbigniew Fiedorowicz -
Add "-s" to the curl options and for good measure add " >/dev/null 2>&1" to the cron command line:
curl -q -s -o /dev/null http://127.0.0.1/moodle/admin/cron.php >/dev/null 2>&1

In reply to Zbigniew Fiedorowicz

Re: cron on Mac OS X

by Robert Brenstein -
Thanks. -s did it. Funny that the email content looked as if it was coming from cron itself.