I have the following command in my cron file:
*/15 * * * * NODE_ENV=production ~/bin/node ~/myapp/app.js > /var/log/nodelog/nodelog_`date "+%Y-%m-%d_%H-%M"`.log
The command itself runs OK when copied and pasted into the bash shell, but the cron job keeps sending the following error message:
/bin/sh: -c: line 0: unexpected EOF while looking for matching ``'
/bin/sh: -c: line 1: syntax error: unexpected end of file
Why does it run OK from the command line, but fail in the cron job? Is there a difference between the syntax expected on the command line and that expected in cron?
From crontab manpage: