I have a script
space_monitor.sh which when ran, will check the used and available disk space in a machine and if the space left is less than a threshold, it will send mail to some mail ids.
The script is running perfectly when I ran through command line.
But when I run it by creating a cron job. It is giving the following error
Mar 27 01:38:01 gudiwadap-udt cron: (ram) RELOAD (crontabs/ram) Mar 27 01:38:01 gudiwadap-udt CRON: (ram) CMD (/home/ram/Desktop/Untitled_Folder/space_monitor.sh) Mar 27 01:38:07 gudiwadap-udt sSMTP: RCPT TO:<firstname.lastname@example.org> (550 5.7.1 Unable to relay) Mar 27 01:38:07 gudiwadap-udt CRON: (ram) MAIL (mailed 1 byte of output; but got status 0x0001, #012)
I tried googling about this, but I could not find any issue online which matches my case.
The crontab entry for the script is
38 00-18 * * 1-5 /home/ram/Desktop/Untitled_Folder/space_monitor.sh
If I am not wrong, above cron job will run every weekday(mon to fri) for every hour from 00 to 18hrs exactly during 38th minute of the hour.
I was even specifying absolute paths to binaries such as
I am not able to figure out what I am doing wrong.
System Details : Ubuntu Desktop 14.04