⇤ ← Revision 1 as of 2007-05-02 23:33:44
Size: 35
Comment:
|
Size: 559
Comment: % in crontab
|
Deletions are marked like this. | Additions are marked like this. |
Line 2: | Line 2: |
== Removed. == | == Why does my crontab job fail? 0 0 * * * some command > /var/log/mylog.`date +%Y%m%d` == In many versions of {{{crontab}}}, the percent sign (%) is treated specially, and therefore must be escaped with backslashes. {{{0 0 * * * some command > /var/log/mylog.`date +\%Y\%m\%d` }}} See your system's manual ({{{crontab(5)}}} or {{{crontab(1)}}}) for details. ''Note: on systems which split the {{{crontab}}} manual into two parts, you may have to type {{{man 5 crontab}}} or {{{man -s 5 crontab}}} to read the part you need.'' |
Why does my crontab job fail? 0 0 * * * some command > /var/log/mylog.`date +%Y%m%d`
In many versions of crontab, the percent sign (%) is treated specially, and therefore must be escaped with backslashes.
{{{0 0 * * * some command > /var/log/mylog.date +\%Y\%m\%d }}}
See your system's manual (crontab(5) or crontab(1)) for details. Note: on systems which split the crontab manual into two parts, you may have to type man 5 crontab or man -s 5 crontab to read the part you need.