Bash Script with docker commands not running via Crontab

Viewed 62

hey guys not sure what I am doing wrong here, but was hoping for some help.

I have a bash script with the following.

#!/bin/bash
docker exec -t wekan-db bash -c "scripts/wekandb_backup.sh" 
docker exec -t wekan-db bash -c "rm -r /dump/*; cp -r /mongodb_backup/ /dump/mongodb_backup"
docker cp wekan-db:/dump /home/ikadmin/codes/backup/wekan/$(date +%Y-%m-%d) 

Everything executes correctly when I run the bash script from the terminal.

However when I try to run it via crontab -e it does not work. Logs do show crontab trying to run it.

Just in case the bash script is currently set as 777 as well.

Any help would be appreciated

EDIT: crontab command

19 8 * * * /bin/bash /home/ikadmin/codes/scripts/backup-wekan-docker.sh
0 Answers
Related