Loading ...
Sorry, an error occurred while loading the content.

Send mail with nail in crontab

Expand Messages
  • tkayna
    Hello ! I simplified my BASH script to understand what s happing in my program. This script works perfectly but not in crontab. I verified full path of
    Message 1 of 1 , Nov 21, 2009
    • 0 Attachment
      Hello !

      I simplified my BASH script to understand what's happing in my program.

      This script works perfectly but not in crontab.
      I verified full path of binaries ... I have no more ideas on what does not work.

      Here is my script :

      #!/opt/bin/bash

      nail='/usr/bin/nail'
      sleep='/bin/sleep'
      echo='/bin/echo'

      function mail_status ()
      {
      ${sleep} 1
      ${echo} $1 $2 | ${nail} -s "Title_$1_$2" myemail@...;
      #echo $? > /tmp/testestest_sendmail.txt
      }

      #### DEBUG TESTS ####

      mail_status "Test" "succes";

      Here is my crontab :

      33 23 * * * /opt/bin/bash /tmp/testmail/send_mail.sh

      What is not good in what I did ?
      Can someone help, Please ?
    Your message has been successfully submitted and would be delivered to recipients shortly.