3

I've got my Model B Pi setup running Raspbian OS. I have added a few jobs to Crontab and they're working very well.

My problem is that I am getting an email each time a job runs. I don't need the emails right now, so is there a way to tell Cron / Crontab to stop sending them?

I do have this line in my crontab file, since I wanted the emails to come at first:

[email protected]

Thanks!

2 Answers 2

6

besides the obvious (removing MAILTO line), you may also try to redirect the output of your scripts to /dev/null, since if the script has any output it will be sent to the user this script belongs to by default.

add something like this to the end of offending scripts in crontab:

>/dev/null 2>&1

the first part '>/dev/null' redirects stdout, the second part "2>&1" redirects stderr as well.

0
0

Delete the mailto line from your crontab file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.