how to make root cron job to send email if there is output
I am executing cron jobs through root.
But i don't receive any email even if there is any eror or ouput. is there any place where i can add my email address so that i get the email if there is any output with root |
Hi mirror51,
There are a few things you will need to check: Is there a line in /etc/crontab like: MAILTO=root@yourhostname.tld Is roots email being redirected, 'grep ^root /etc/aliases' and if so who to? Do you have a local mta (sendmail|postfix|exim) running ? Is it configured appropriately to send non-local email? You will need to dig a bit deeper... cheers |
My all the default emails address was empty for root.
I went to whm with root aadded the email address there. I do received an email but it has many lines like this stdin: is not a tty stdin: is not a tty stdin: is not a tty stdin: is not a tty stdin: is not a tty stdin: is not a tty Why is that |
A quick google found this:
"Its due to mesg y line which you can find in /etc/bashrc or in ~/.bashrc or ~/.profile file." Ref: http://platonic.techfiz.info/2008/10...-is-not-a-tty/ Please try commenting out this line and see if the problem persists cheers |
All times are GMT -5. The time now is 05:37 AM. |