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 starts OK when copying and pasting into the bash shell, but the cron job continues to send 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 on the OK command line but does not work in the cron job? Is there any difference between the syntax expected on the command line and the expected on cron?
source share