0

This question already has an answer here:

When I use time and date at the end of a crontab line like backup`date +%F_%T`.sql or like backup`date%d%m%y`.sql, my crontab command doesn't work. But when I remove it, it works perfectly.

Why doesn't it work when I use time and date like date%d%m%y?

marked as duplicate by muru, Mikel, Braiam, mdpc, Mat Jan 1 '16 at 5:20

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • The formatting is wrong and very hard to read. Please fix it, and include the exact commands you're running and the exact contents of your crontab. – Mikel Jan 1 '16 at 1:40
0

First of all you need to escape every % and you should also use a little different syntax with date. So e.g. this one will work just fine:

`date "+\%d\%m\%y"`.sql

Not the answer you're looking for? Browse other questions tagged or ask your own question.