MySQL - 定时数据备份

数据备份真的很重要, 因为可能有一天数据会被莫名其妙的删掉了. ...

December 28, 2020 · 1 min · K8sCat

crontab 无法执行 docker-compose 命令

0 0 * * * cd /somewhere && docker-compose up -d some-service 像这样的定时任务没法正常启动? This is unlikely to be an issue with docker-compose. It's good practice to use absolute paths in crontabs because your $PATH may not be the same as an interactive shell. Maybe add set -x to see why it's failing? # whereis docker-compose 0 0 * * * cd /somewhere && /usr/local/bin/docker-compose up -d some-service Refer: https://github.com/docker/compose/issues/2293

September 11, 2019 · 1 min · K8sCat