I have the following file execute-backup-from-container.sh. The content of this file is:
#!/bin/bash FILE=minime.sql.`date +"%Y%m%d".gz` CONTAINER='mysql_01' SCRIPT_ON_CONTAINER='/container-mysql-dump.sh' ${OUTPUT}=$(docker exec ${CONTAINER} /$SCRIPT_ON_CONTAINER) echo "==============" echo "$CONTAINER:/$FILE" echo "==============" docker cp "$CONTAINER:/$FILE" backup-data/ When I run crontab -e I am putting the following:
0 5 * * 1 /home/me/projects/execute-backup-from-container.sh This means that the execute-backup-from-container.sh should be executed every day at 5:00 am.
The problem is that the script is not executed at all.
So what on earth is the problem? Why is it not executed?
*instead of1?${OUTPUT}=...should just beOUTPUT=...