Disable cron notification from SSH

Vs Nu

Well-Known Member
Jul 17, 2015
135
9
68
India
cPanel Access Level
Root Administrator
My mail queue is almost frozen mails with over 7k to 10k All mails are related to cron notification

i went to cP > Cron job and i can see the cron notification Email was updated with the cPanel username which is causing the issue

How can i disable the cron notification on bulk for all accounts by removing the cpanel username mentioned in cron notification page
 

Vs Nu

Well-Known Member
Jul 17, 2015
135
9
68
India
cPanel Access Level
Root Administrator
It was showing the cPanel username which is causing the issue.It should be

Current Email
(None)

How to set this for all the cPanel accounts from root SSH any commands
 

Attachments

kodeslogic

Well-Known Member
Apr 26, 2020
327
126
118
IN
cPanel Access Level
Root Administrator

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
7,440
1,004
313
cPanel Access Level
Root Administrator
Thanks for the details. There isn't an automated way to add or change the email at once for all domains, but you could set up a valid email by editing /var/spool/cron/$username for each user directly, which may be quicker than logging into cPanel for each account.

If you just wanted to disable the notifications completely, adding the line that @kodeslogic mentions would work.
 

Vs Nu

Well-Known Member
Jul 17, 2015
135
9
68
India
cPanel Access Level
Root Administrator
Thanks for the details. There isn't an automated way to add or change the email at once for all domains, but you could set up a valid email by editing /var/spool/cron/$username for each user directly, which may be quicker than logging into cPanel for each account.

If you just wanted to disable the notifications completely, adding the line that @kodeslogic mentions would work.
As we need to do it for morethan 100+ users so we need to do it manually as it was creating more mails like 20k per day
 
  • Like
Reactions: cPRex

Vs Nu

Well-Known Member
Jul 17, 2015
135
9
68
India
cPanel Access Level
Root Administrator
I had taken the cp username and stored in cron.txt and made an command to do on all the user's cron file which is sending out more emails

for i in `cat cron.txt`; do echo 'MAILTO=""' >> /var/spool/cron/$i ;done