title: Script doesn't execute in crontab
body: <p>I wanna run a script using crontab in every minute. The script is located at <code>/Users/robin47/Desktop/script/demo.sh</code>. As a side note, I give the execute permission of <code>demo.sh</code> file with <code>chmod +x demo.sh</code> command.</p>
  <p>But it doesn't execute the script. Here is the process I'm following:</p>
  <p>Run <code>crontab -e</code> from the terminal.</p>
  <pre><code>robin47@mac-pro ~ % crontab -e
  </code></pre>
  <p>this open a file(crontab.xxxxxxx) in nano which is located under tmp folder, as an example <code>File: /tmp/crontab.V4DcXEJU8g</code>.</p>
  <p>This is my <code>crontab.xxxxxxx</code> file:</p>
  <pre><code>SHELL=/bin/bash 
  PATH=/bin:/sbin:/usr/bin:/usr/sbin
  * * * * * /bin/bash /Users/robin47/Desktop/script/demo.sh
  </code></pre>
  <p><a href="https://stackoverflow.com/questions/20582224/shell-script-not-running-via-crontab-but-runs-fine-manually">Get from here</a>, this doesn't execute my <code>demo.sh</code> script.</p>
  <p>If I run sh command from terminal like <code>sh demo.sh</code>, it works. And if I directly echo(or run any command like touch, mkdir) in crontab like this</p>
  <pre><code>SHELL=/bin/bash 
  PATH=/bin:/sbin:/usr/bin:/usr/sbin
  * * * * * echo 'hello' &gt;&gt; /Users/robin47/Desktop/script/text.txt 
  </code></pre>
  <p>It also works. But doesn't run the script using crontab. I appreciate your help, Thanks.</p>
  <p>This is my <code>demo.sh</code> file:</p>
  <pre><code>#!/bin/sh
  
  echo &quot;hello world&quot; &gt;&gt; /Users/robin47/Desktop/script/text.txt
  </code></pre>