Running cron job creates an error unexpected EOF while looking for matching ``'
cron, cron-task
Solution
You have to escape the `%` character. `man 5 crontab` says:
Percent-signs (%) in the command, unless escaped with backslash (\),
will be changed into newline characters, and all data after the first %
will be sent to the command as standard input.
Problem
I can see that this is "usual" error, but can not find solution in my case... Running Crontab job with: ``` expr `date +%W` % 2 > /dev/null && curl https://mysite.com/myscript ``` It causes errors: ``` /bin/sh: -c: line 0: unexpected EOF while looking for matching ``' /bin/sh: -c: line 1: syntax error: unexpected end of file ``` Can you help me how to avoid them? Thank you very much in advance!