title: Shell script runs manually but not executed through cron job
body: <p>I am using a shell script to delete log files in my Linux machine. And I have used crontab to execute this job periodically. I can execute this script manually and see it is working fine. But the script is not triggered through cron job.</p>
  
  <p>Shell script:</p>
  
  <blockquote>
    <p>[root@testVM-dev log]# vim /path_to_dir/log_cleanup.sh</p>
  </blockquote>
  
  <pre><code>#!/bin/bash
  
  now=$(date)
  echo "Cron Job to delete log files start...@ $now" | tee -a /path_to_dir/log/cronjob_log.log
  
  /usr/bin/find /path_to_dir/log/localhost_access_log.* -type f -mtime +5 -print -delete | tee -a /path_to_dir/log/cronjob_log.log
  
  echo "Delete files completed!" | tee -a /path_to_dir/log/cronjob_log.log
  </code></pre>
  
  <p>crontab entry: (Runs every minute)</p>
  
  <pre><code>[root@testVM-dev log]# crontab -l
  */1 * * * * root /path_to_dir/log_cleanup.sh
  </code></pre>
  
  <p>Also I have checked in cron logs that the job is executed every minute. But I couldn't see any logs in the targeted log file "cronjob_log.log"</p>
  
  <p>cron logs:</p>
  
  <blockquote>
    <p>vim /var/log/cron</p>
  </blockquote>
  
  <pre><code>Jul 16 03:56:01 rstestVM-dev crond[19131]: (root) CMD (root /path_to_dir/log_cleanup.sh)
  Jul 16 03:57:01 rstestVM-dev crond[19150]: (root) CMD (root /path_to_dir/log_cleanup.sh)
  Jul 16 03:58:01 rstestVM-dev crond[19168]: (root) CMD (root /path_to_dir/log_cleanup.sh)
  Jul 16 03:59:01 rstestVM-dev crond[19188]: (root) CMD (root /path_to_dir/log_cleanup.sh)
  </code></pre>
  
  <p>Can someone help me on what is going wrong here?</p>