When i just run the "ksh /home/rtaaa/tbasd/report.sh > /home/rtaaa/tbasd/logs/report.log" from the command prompt, the email will be sent out without any issues.. but when its triggered by the crontab, the email is not getting sent.. the whole script is running well except the email part.
This is what i am doing to send the file: "sendmail $ADDR < $MAILFILE"
I have been trying to debug this without success for a while, any help is appreciated.
Best way to solve this (considering best practices) is specify full path name to sendmail in the script. You can find out where sendmail lives by typing:
Handle all redirection within the script as well. It also helps to create a directory just for cron jobs, so your final script would be something like /usr/local/cron/run-report.