title: Running Node as Cron task
body: <p>I have a simple question. I try to run a Node JS program on a Cron task via a bash script.</p>
  
  <p>So, on crontab -e, I made a task @reboot that execute boot.sh :</p>
  
  <pre><code># m h  dom mon dow   command
  @reboot bash /home/pi/boot.sh
  </code></pre>
  
  <p>And my bash script :</p>
  
  <pre><code>#!/bin/sh
  set -e
  cd /home/pi/Sites/node-raspberry-pi/
  /usr/bin/git pull
  node /home/pi/Sites/node-raspberry-pi/index.js 3000 # where 3000 is the argument of my program
  exit 0
  </code></pre>
  
  <p>When I do <code>bash /home/pi/boot.sh</code>, it works as supposed.</p>
  
  <p>What do I miss ?</p>
  
  <p><em>Note : both <code>crontab -e</code> and <code>bash /home/pi/boot.sh</code> are exectued as <code>pi</code> user.</em></p>