Crontab and sh script

I have an sh script I want called every three hours via cron. The script calls a bunch of node.js scripts and works perfectly when called directly. However, when called via cron, I get a date logged by the sh script but none of the other logs from my node.js scripts (which all log fine when the sh is called directly). Any idea why?

The script is located in an interior directory but I'm using all absolute paths. Please find my code below and more details on the node.js stuff if necessary on Github (NB: the server was recently changed from sh to bash but I don't think this should have any real impact).

Crontab

SHELL=/bin/sh
MAILTO=my@email.com
0 */3 * * * /absolute/path/to/script.sh

script.sh

#!/usr/bin/env sh
node /absolute/path/to/script1.js
node /absolute/path/to/script2.js
node /absolute/path/to/script3.js

LOGFILE=/absolute/path/to/error.log

log(){
    message="$@"
    echo $message
    echo $message >>$LOGFILE
}

log "Cron performed $(date)"

Crontab does not load your normal user environment when it invokes a command, so any other environment variables your bash script or node.js stuff depends on won't be there. For example, how does your shell find the 'node' command?

Cron scripts do not run in your user account's bash environment, so running them directly in your shell is not a valid test.

PATH=/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
SHELL=/bin/sh
MAILTO=my@email.com
0 */3 * * * /absolute/path/to/script.sh