title: Cron job generate duplicate processess
body: <p>My cron is like below:</p>
  
  <p><strong>$ crontab -l</strong></p>
  
  <pre><code>0,15,30,45 * * * * /vas/app/check_cron/cronjob.sh 2&gt;&amp;1 &gt; /vas/app/check_cron/cronjob.log; echo "Exit code: $?" &gt;&gt; /vas/app/check_cron/cronjob.log
  </code></pre>
  
  <p><strong>$ more /vas/app/check_cron/cronjob.sh</strong></p>
  
  <pre><code>#!/bin/sh
  
  echo "starting script";
  
  /usr/local/bin/rsync -r /vas/app/check_cron/cron1/ /vas/app/check_cron/cron2/
  
  echo "completed running the script";
  </code></pre>
  
  <p><strong>$ ls -l /usr/local/bin/rsync</strong>          </p>
  
  <pre><code>-rwxr-xr-x   1 bin      bin       411494 Oct  5  2011 /usr/local/bin/rsync
  </code></pre>
  
  <p><strong>$ ls -l /vas/app/check_cron/cronjob.sh</strong></p>
  
  <pre><code>-rwxr-xr-x   1 vas     vas         153 May 14 12:28 /vas/app/check_cron/cronjob.sh
  </code></pre>
  
  <p>if i run it manually ... the script is running well. </p>
  
  <pre><code>$ /vas/app/check_cron/cronjob.sh 2&gt;&amp;1 &gt; /vas/app/check_cron/cronjob.log; echo "Exit code: $?" &gt;&gt; /vas/app/check_cron/cronjob.log
  </code></pre>
  
  <p>if run by crontab, the cron generate double processes more than 30 in 24hours until i kill them manually.</p>
  
  <p><strong>$ ps -ef | grep cron | grep -v root | grep -v grep</strong></p>
  
  <pre><code>vas 24157 24149   0 14:30:00 ?           0:00 /bin/sh /vas/app/check_cron/cronjob.sh
  vas 24149  8579   0 14:30:00 ?           0:00 sh -c /vas/app/check_cron/cronjob.sh 2&gt;&amp;1 &gt; /vas/app/check_cron/cronjob.log; ec
  vas 24178 24166   0 14:30:00 ?           0:00 /usr/local/bin/rsync -r /vas/app/check_cron/cron1/ /vas/app/check_cron/cron2/
  vas 24166 24157   0 14:30:00 ?           0:01 /usr/local/bin/rsync -r /vas/app/check_cron/cron1/ /vas/app/check_cron/cron2/
  </code></pre>
  
  <p>Please give me advice how to make running well and no processes still running in the system
  and processes stop properly.</p>
  
  <p>BR,
  Noel</p>