Deprecated: Function set_magic_quotes_runtime() is deprecated in /nfs/c01/h08/mnt/2939/domains/ on line 14
Cidamon: Blog: Stop cron job from sending output email
Stop cron job from sending output email
05 January, 2009

I created a cron job which needs to run every 5 minutes. So it was sending me 12 emails per hour and my inbox got overwhelmed by email pretty soon. I had plesk control panel and plesk won’t let you leave email field empty so I started to look for a solution. There are lot out there but it seemed hard to understand which one will work and which won’t – so anyway this is what worked for me in plesk 8.2.1, I added the following string after my cron command –

>/dev/null 2>&1

so my final string was –

/usr/bin/curl >/dev/null 2>&1

“ >/dev/null 2>&1” will redirect all output to /dev/null and nothing will be produced and so no email is sent.


Commenting is closed for this article.