Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

How do I turn off receiving an email from lynx that recaps what it did?

I have crontab running a PHP script and that works fine. But each time cron runs my lynx browser I get an email from the cron daemon recapping the lynx commands.

I don't need them.

Thanks.

share|improve this question
add comment

2 Answers

Found it....

append >/dev/null 2>&1 to the end of your cron command line

share|improve this answer
add comment

It isn't lynx that is sending e-mail — it's cron. This is a feature: by default, any output of cron jobs gets mailed to the owner of the crontab. You can find the documentation for this in man 5 crontab, but in short, if you want to suppress all mailed output, set MAILTO="" at the top of your crontab file. Alternately, you can suppress output from the individual jobs (in a per-command-specific way, like grep --quiet if you happen to have grep commands in your crontab), or redirect the output elsewhere — to a log file, or just to /dev/null. Or, you can pipe it to the mail command, using -s to give the mail a meaningful subject rather than the default (ugly) cron-output subject line.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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