I can't seem to execute this command from a crontab. It works fine from the command line.
index.js
#!/usr/bin/env node
//do stuff
crontab
*/5 * * * * flock -n /tmp/reddit.lock /usr/local/bin/node /home/user/projects/reddit/index.js -u me -p 'pass' -vvv
error
/bin/sh: -c: line 0: unexpected EOF while looking for matching `''
/bin/sh: -c: line 1: syntax error: unexpected end of file
My password has a '%' in it. So I had to remove the single quotes and pass the argument as:
This took me awhile to find the problem, hopefully it helps someone else.