Home > Linux, Tips and Tricks > Cron 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
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: