Cron Job – How to send an output file to an email
If the script is reporting errors, they may be going to stderr, but you’re only redirecting stdout. You can redirect stderr by adding 2>&1 to the command: * * * * * /var/www/dir/sh/mysql_dump.sh 2>&1 | mail -s “mysql_dump” [email protected]