Want to avoid receiving empty emails from the #Linux, #FreeBSD, or #Unix cron job? Set the MAILTO variable before the job. For instance:

MAILTO="" # turn it off

40 12 1 * * /path/job1

MAILTO="foo@example-com" # send output here

10 4 * * * /path/job2

See https://www.cyberciti.biz/faq/disable-the-mail-alert-by-crontab-command/ and https://www.cyberciti.biz/faq/linux-unix-crontab-change-mailto-settings/ for more info.

Reply to this note

Please Login to reply.

Discussion

No replies yet.