Manikandan M <mani....@gmail.com> 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 should look like this: 0 9 * * * /bin/bash /user/bin/email-script Also: 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: >> > 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. Grüße, Sven. -- Sigmentation fault. Core dumped. -- 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/7b9c5r839...@mids.svenhartge.de