In the beginning of a crontab file you could use the MAILTO
instruction to indicate you want the output to be sent as an e-mail to an e-mail address. I would like to send the output to multiple addresses. Is it possible (and how) to specify multiple addresses?
It may differ depending exactly which cron daemon package you use, but this is from the manpage of Vixie Cron on Ubuntu Hardy:
If you're not using Vixie Cron, or aren't sure, try the manual page for the crontab file:
man 5 crontab
Example
As an alternative to the above answers, you can send email to a single address which is a mail group or distribution list. This works especially well if you manage multiple servers since it is easier to manage addresses on your mail server rather than in crontab of each individual machine.
One solution might be a
.forward
file on that user account which sends mail to the appropriate addresses.The best answer is probably to either check your man pages for your distro's current version of cron/crontab to see if there's something that can be done with the MAILTO parameter or specify a mail address that in turn forwards mail to multiple addresses for you.
There are often two
crontab
man pages, the configuration file is typically in section 5, so useman -s 5 crontab
.Add
,
after each email, e.g.:MAILTO="[email protected],[email protected]"