0

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.

H. Ferrence
  • 533
  • 3
  • 10
  • 18

2 Answers2

1

Found it....

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

H. Ferrence
  • 533
  • 3
  • 10
  • 18
1

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.

mattdm
  • 6,600
  • 1
  • 26
  • 48