Другая причина, по которой crontab не удастся: Специальная обработка символа %
.
Из файла man :
The entire command portion of the line, up to a newline or a
"%" character, will be executed by /bin/sh or by the shell specified
in the SHELL variable of the cronfile. A "%" character in the
command, unless escaped with a backslash (\), will be changed into
newline characters, and all data after the first % will be sent to
the command as standard input.
В моем конкретном case, я использовал date --date="7 days ago" "+%Y-%m-%d"
для создания параметров для моего скрипта, и он терпел неудачу молча. Я, наконец, узнал, что происходит, когда я проверил syslog
и увидел, что моя команда была усечена символом %
. Вам нужно избежать этого:
date --date="7 days ago" "+\%Y-\%m-\%d"
Подробнее см. Здесь:
http://www.ducea.com/2008/11/12/ используя-на-символ-в-Crontab-записи /