DEV Community

loading...

Execute Date Format In Cron

clavinjune profile image Clavin June Originally published at clavinjune.dev on ・1 min read

Escaping % in crontab using \%

example

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

Enter fullscreen mode Exit fullscreen mode

Discussion (0)

pic
Editor guide