Disable successful Cron Daemon notifications?

N Webber

Member
Sep 8, 2016
7
1
1
UK
cPanel Access Level
Root Administrator
Hi, I receive these emails daily from (Cron Daemon):
Cron <[email protected]> (/usr/local/cpanel/scripts/fix-cpanel-perl; /usr/local/cpanel/scripts/upcp --cron)

As I have forwarded all the *@domain to my email.

I've read it's possible to remove the email notification completely with adding:
> /dev/null 2>&1
to:
28 0 * * * /usr/local/cpanel/scripts/upcp --cron

But is it possible to just disable the email notifications if it is successful, so if it fails we can receive an email about it.

Maybe the option is in the Contact Manager in WHM?

Thanks
 

GOT

Get Proactive!
PartnerNOC
Apr 8, 2003
1,755
316
363
Chesapeake, VA
cPanel Access Level
DataCenter Provider
run crontab -e and at the top of that file, insert

MAILTO=""

That will disable all email notifications for the root crons.
 
  • Like
Reactions: WebHostPro

N Webber

Member
Sep 8, 2016
7
1
1
UK
cPanel Access Level
Root Administrator
But I won't get a notification then if it fails?
I only want an email notification if it fails (some error occurs), not if it's successful and no error occurs.
 

Infopro

Well-Known Member
May 20, 2003
17,090
519
613
Pennsylvania
cPanel Access Level
Root Administrator
Twitter

N Webber

Member
Sep 8, 2016
7
1
1
UK
cPanel Access Level
Root Administrator
Ok, so just to be clear, if I change my cronjob from:
28 0 * * * /usr/local/cpanel/scripts/upcp --cron
to:
28 0 * * * /usr/local/cpanel/scripts/upcp --cron > /dev/null 2>&1

That will disable the Cron Daemon emails, but if the script fails the Contact Manager will send me another email notifying me?
 
  • Like
Reactions: cPanelLauren
Thread starter Similar threads Forum Replies Date
S Email 1
C Email 3
K Email 7
H Email 3
J Email 3