I'd like to get the output of our crons to be emailed to me, as we've been having some issues recently which would have been much easier to resolve if they'd been emailed.
I've googled it and it suggested adding: | mail -s "subject" address@address.com
So what I've got now is:
*/5 * * * * /usr/bin/php/ /root/to/file/test.php | mail -s "test output" me@domain.com
However it's not sending anything.
I've been into the cron log and it's outputting this:
May 14 11:10:01 moodledev crond[16793]: (root) CMD (/usr/bin/php /root/to/file/test.php | mail -s "test output" me@domain.com^M)
The only thing that looks wrong to me is the ^M at the end, which i'm not sure where it has appeared from.
Any clues on where i'm going wrong?
Cheers.

New Topic/Question



MultiQuote





|