I have a cronjob:
* * * * * root echo 'blabla'
It is an easy one :)
Now, I would like to send an email when this cronjob is done, but also to store the log in a log file.
I tryed this:
* * * * * root echo 'blabla' | mail -s "Cron report" test@example.com > /test/test.log 2>&1
The email is sent and the test.log file is created, but the test.log file is empty.
Any idea why?