0

I am currently trying to Backup my persistant Docker data once a week. But somehow my cronjob wont work. Cron has no problem with other jobs. Just with this one and i dont understand why. I edited the cronjob with my normal user, not root. The command works if i use it normally in bash. Anybody got an idea?

0 1 * * SUN cp -r /home/docker /home/brian/docker_backup/alserver_backup_$(date +%y_%m_%d)

  • Perhaps this will help: [How can I execute `date` inside of a cron tab job?](https://unix.stackexchange.com/a/29582/65304) – steeldriver Aug 09 '22 at 22:05
  • Yes. Thank you @steeldriver. After reading that post i just put my command into an shellfile and used the file in cron. – BrianFarmer Aug 09 '22 at 22:12

0 Answers0