use*_*003 10 cron crontab cron-task
我可以看到这是"常见的"错误,但在我的情况下无法找到解决方案......
运行Crontab作业:
expr `date +%W` % 2 > /dev/null && curl https://mysite.com/myscript
Run Code Online (Sandbox Code Playgroud)
它会导致错误:
/bin/sh: -c: line 0: unexpected EOF while looking for matching ``'
/bin/sh: -c: line 1: syntax error: unexpected end of file
Run Code Online (Sandbox Code Playgroud)
你能帮我解决一下吗?非常感谢你提前!
Dan*_*kov 20
你必须逃脱这个%角色.man 5 crontab说:
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.
Run Code Online (Sandbox Code Playgroud)