A piggy bank of commands, fixes, succinct reviews, some mini articles and technical opinions from a (mostly) Perl developer.

Email output from the crontab

method 1 - for all commands

Add this as the first line of crontab:

MAILTO=address1@host.com,address2@host.co.uk

method 2 - for specific commands

Add this line anywhere near the top:

NOTIFY_LIST="address1@host.com,address2@host.co.uk"

Use this for the command:

00 09 * * * run_command | mail -s "command has run" $NOTIFY_LIST