1825775 Members
2124 Online
109687 Solutions
New Discussion

cron don't send mail

 
SOLVED
Go to solution
j773303
Super Advisor

cron don't send mail

After cron job run, users may got an mail.
Is it possible let cron don't send mail?
Thanks.
Hero
4 REPLIES 4
gstonian
Trusted Contributor

Re: cron don't send mail

Best solution would be to take out the mail command in the job run by cron.
Peter Godron
Honored Contributor

Re: cron don't send mail

Hi,
is the mail sent by the application ?
If yes, stop the application from sending the mail.
What does the mail say ?
Reshma Malusare
Trusted Contributor

Re: cron don't send mail

Hi,
First check your cron entries by
Crontab -l

then now you dont want mails then just remove that mail activity from file by editing the crontab by command
crontab -e

Regards,
Reshma
James R. Ferguson
Acclaimed Contributor
Solution

Re: cron don't send mail

Hi:

If I understand correctly, you *don't* want users to receive mail from crontasks. If your task produces either STDOUT or STDERR output that isn't redirected to a file, 'cron' generates an email to the user.

If this is the case, redirect the descriptor that you don't want: STDERR=2 and STDOUT=1.

Regards!

...JRF...