A message for Linux.com registered users: We are in the process of making changes to the Linux forums. Starting Monday, 8/13/18 at 6:00 PM PT, you will be unable to access the forums. They will re-launch as soon as possible on Wednesday, 8/15/18 with new features and improved functionality. Thank you for your patience and stay tuned for the new improved forums.
Reading Cronjob Output
I have a task setup to run on my cronjob where I need to read the output. What I need from the output is the starting character (let's say 'A') and the ending character (let's say 'Z'). A helps me understand my script started from the right place, and Z helps me understand my script finished at the right place.
So, it is important for me to run that cronjob, and see that my output is having proper A and Z.
I know that not sending the script to '> /dev/null' will try to mail using the MTA, which is not something I want to do. I also don't want to send it to /dev/null because I need to read the output.
When I run my script normally from the console (tty), I am able to see the start character (A) and end character (Z), but when I let the cronjob run, my script fails to read the start character and complains about 'no start characters'.
What can be the problem?