Being a *nix noob, I found it really hard to figure out the problem I had with a cron job last week.
The fact that sendmail was disabled in the machine I was working on also didn’t help (no emails were sent during failed cron task execution).
To workaround the problem, I found a useful tip from this post which enables console logging for cron.
add this line to /etc/syslog.conf
I then got an error from the redirect logs which said:
sudo: sorry, you must have a tty to run sudo
This was easily fixed by commenting out the line below from /etc/sudoers (a tip from another blog post):
Hope this helps!