0

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?

Mat
  • 52,586
Dani
  • 37
  • 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 01 '16 at 01:40

1 Answers1

2

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
monsune
  • 507