<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    At last i managed to run the srcipt successfully on the cron<br>
    <br>
    <br>
    <br>
    I added the following lines on the below two lines on cron before
    the script<br>
    <br>
    <b>SHELL=/bin/sh</b><b><br>
    </b><b>PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin</b><br>
    <br>
    */10 * * * * sh /etc/rsync.sh<br>
    <br>
    <br>
    And changed the access level of the rsync.sh<br>
    <br>
    <br>
    Without the above two lines its not executing<br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <div class="moz-cite-prefix">On 05/08/2015 02:07 alasiri, Andreas
      Tauscher via Linux wrote:<br>
    </div>
    <blockquote cite="mid:55C1EE7F.3090002@geuka.net" type="cite">
      <pre wrap="">Have you checked the mails for root?
Output of the script you will not find in the logfile it is sent by mail.
If there are no mails then set MAILTO=root in the crontab.

Next if a script is running from a interactive shell does not mean it
will run as cron job. The environment might be different.
When you test the script set the environment identical to cron's
So run as root (or what ever user you set in crontab)
env -i SHELL=<from /etc/contab> PATH=<from /etc/contab> HOME=<user home>
LOGIN=<login name> /etc/rsync.sh


</pre>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
The Arusha Linux User Group: <a class="moz-txt-link-freetext" href="http://unix.or.tz">http://unix.or.tz</a>
Linux mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Linux@lists.habari.co.tz">Linux@lists.habari.co.tz</a>
<a class="moz-txt-link-freetext" href="http://lists.habari.co.tz/cgi-bin/mailman/listinfo/linux">http://lists.habari.co.tz/cgi-bin/mailman/listinfo/linux</a>

The Arusha LUG mailing list is generously hosted by Habari Node Ltd: <a class="moz-txt-link-freetext" href="http://www.habari.co.tz/">http://www.habari.co.tz/</a>

The above comments and data are owned by whoever posted them (including attachments if any). The mailing list host is not responsible for them in any way.</pre>
    </blockquote>
    <br>
  </body>
</html>