Hi, I couldn't find why the script is not working in cron. Just replaced the crontab entry with the following and it worked
* 9 * * * /bin/bash /user/bin/email-script Thanks everyone for your help. Regards, Mani On Fri, Jan 2, 2015 at 9:13 PM, Don Armstrong <d...@debian.org> wrote: > On Fri, 02 Jan 2015, Manikandan M wrote: > > I have written a small script to email (using ssmpt) some details, and > > scheduled it in crontab. The script is running as per time mentioned in > the > > cron but ssmtp is not sending the mail. please find the details below. > > > > user@host ~ $ cat bin/email-script > > /home/user/bin/actual-script > ~/details-file > > ssmtp usern...@gmail.com < ~/details-file > > echo $? > ~/email-status > > > > The crontab entry is as below > > 0 9 * * * /home/user/email-script > > If this is actually the script, > > 1) It's missing #!/bin/sh or #!/bin/bash > > 2) It's in /home/user/bin/email-script, not /home/user/email-script > > 3) It may not be executable. > > -- > Don Armstrong http://www.donarmstrong.com > > life's not a paragraph > And death i think is no parenthesis > -- e.e. cummings "Four VII" _is 5_ > > > -- > To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org > with a subject of "unsubscribe". Trouble? Contact > listmas...@lists.debian.org > Archive: > https://lists.debian.org/20150102211336.gb29...@teltox.donarmstrong.com > >