DEV Community

Clavin June
Clavin June

Posted on • Originally published at clavinjune.dev on

Execute Date Format In Cron

Escaping % in crontab using \%

example

0 0 * * 5 cat ~/log >> \
~/log-`date +"\%Y-\%m-\%d"` && \
> ~/log

Enter fullscreen mode Exit fullscreen mode

Top comments (0)