crontab 无法执行 docker-compose 命令

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



Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now