Re: Script to email details not working in cron

2015-01-03 Thread Bob Proulx
Sven Hartge wrote: > You don't need the manually invoke /bin/bash if you just add > "#!/bin/bash" as the first line of your shell script, which Don already > pointed out: > >> 3) It may not be executable. Yes. Make sure it is executable. chmod a+x /home/user/bin/email-script Bob P.S. Persona

Re: Script to email details not working in cron

2015-01-03 Thread Sven Hartge
Manikandan M wrote: > 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 This will run the script _every minute_ on the ninth hour. I don't think this is what you really want. It

Re: Script to email details not working in cron

2015-01-03 Thread Manikandan M
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 wrote: > On Fri, 02 Jan 2015, Ma

Re: Script to email details not working in cron

2015-01-02 Thread Don Armstrong
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-s

Re: Script to email details not working in cron

2015-01-02 Thread Bob Proulx
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. A couple of details to provide background to understan

Re: Script to email details not working in cron

2015-01-02 Thread Emil Oppeln-Bronikowski
On Fri, Jan 02, 2015 at 06:39:27PM +, Manikandan M wrote: Are other scripts running fine? Can you throw a silly date >>/tmp/imalive into it and see? Does ssmtp (I'm unfamilar with it) requies some special env-var that can be unset when running from Cron? -- People are like potatos. They d

Re: Script to email details not working in cron

2015-01-02 Thread Manikandan M
Thanks for the quick response Patrick. I have given the full path for all the executables in the script. Still i'm not getting the email. The first line of the script works which updates the details-file. The third line of the script works which updates the status of the email operation. Both the d

Re: Script to email details not working in cron

2015-01-02 Thread Patrick Wiseman
On Fri, Jan 2, 2015 at 1:39 PM, Manikandan M wrote: > Hi, > > 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

Script to email details not working in cron

2015-01-02 Thread Manikandan M
Hi, 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