title: Bash script run from cron
body: <p>I have the following bash script:</p>
  
  <pre><code>#!/bin/bash
  src="/home/user/testingscript"
  for dir in $(ls "$src")
  do
  find ${src}/${dir}/ -type f -mtime +31 delete
  done
  </code></pre>
  
  <p>It runs fine if i execute it from the terminal, but once i put it in the crontab like that:</p>
  
  <pre><code>* * * * * /bin/bash /home/user/script/mailboxclean.sh &gt;&gt; /home/user/mailboxcleanup.log 2&gt;&amp;1
  </code></pre>
  
  <p>or as:</p>
  
  <pre><code>* * * * * /home/user/script/mailboxclean.sh
  </code></pre>
  
  <p>it doesnt run.</p>
  
  <p>I see no feedback in the syslog, apart that the script has been executed and in the mailboxcleanup.log where i am redirecting I see the followinh which doesnt really help:</p>
  
  <pre><code>/home/user/mailboxcleanup.log: 1: /home/user/mailboxcleanup.log: /bin/sh:: not found
  </code></pre>
  
  <p>Any ideas?</p>
  
  <p>Thanks</p>