The hosting support guys recommended a similar solution to one of those in docs.moodle.org i.e.
php -f /home/username/public_html/moodle/admin/cron.php > /dev/null
which works. At least it seems to. Nb using -f is needed because I am passing a filename not a web address.
However I now get emails with
"doesn't appear to be a valid Zend extension"
which looks like it's a warning not an error so cron still completes the cron job (I think)
I have tried using --quiet and then I get the output from the cron job with that zend bit first. I thought this would suppress all errors and warnings?
I was wondering why the > /dev/null doesn't prevent me receiving the emails but apparently it's only needed if the output isn't written to an email so I guess I can lose that bit.
I only want to get emails if the cron job fails. Anyone have a definitive answer on how i might get this?