I have one cron job where I want to send its output to /dev/null but in case an error happens then it should send an email.
Otherwise I get an email daily of the output of cron and it’s difficult for me to see when errors occured or not.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
How about
Exploded, it is
The actual call to mail/mailx may be slightly funky, I don’t have a way to test it right now.
I hope this helps.