Linux, Tips and TricksCron output to multiple email addresses

Cron output to multiple email addresses

On Ubuntu 13.04

By default, the output of the cron job is sent as an email to the account email under which the cron ran.

Sometimes, we need to send the output of the cron job to multiple users. For example, if you want all your team members to be notified of the output.

You can create a .forward file in your home directory and put all the emails in that file

cd ~
touch .forward
echo "myFirstMail@gmail.com,mySecondMail@yahoo.com" > .forward

If you are running the cron under root, then create /root/.forward

Categories: Linux, Tips and Tricks

Comments

No Comments Yet. Be the first?

Post a comment

Your email address will not be published. Required fields are marked *