title: How can you execute a Node.js script via a cron job?
body: <p>Quite simply, I have node script that I want to execute once a month.</p>
  
  <pre><code>30 6 1 * * node /home/steve/example/script.js
  </code></pre>
  
  <p>But this doesn't work, presumably because of path or the shell the command is being ran under. I've tried the following means of executing node via cron (tested with -v):</p>
  
  <pre><code>steve@atom:~$ node -v
  v0.4.2
  
  steve@atom:~$ sh node -v
  sh: Can't open node
  
  steve@atom:~$ bash node -v
  /usr/local/bin/node: /usr/local/bin/node: cannot execute binary file
  
  steve@atom:~$ /usr/local/bin/node -v
  v0.4.2
  
  steve@atom:~$ sh /usr/local/bin/node -v
  /usr/local/bin/node: 1: Syntax error: "(" unexpected
  
  steve@atom:~$ bash /usr/local/bin/node -v
  /usr/local/bin/node: /usr/local/bin/node: cannot execute binary file
  </code></pre>
  
  <p>I've ran out of ideas to try, any advice?</p>