I have this script which I run once a month, and I want to get the output sent to my email.
If I run it manually like so, then the standard output is sent to my email.
./monthly_mail.sh | mail -s "Mail purged" email@example.com
But when I added the following line to my
crontab, I just get a blank email. Why isn't the stdoutput of the script piped to
* * 2 * * /var/mail/monthly_mail.sh | /usr/bin/mail -s "Mail purged" firstname.lastname@example.org