Docker Compose v5.8.0: Scheduled Jobs
Docker Compose v5.8.0 adds a top-level jobs: element: containers that run to completion, on demand or on a schedule, declared next to the services they work with. A nightly database backup no longer needs a cron entry on the host or a container running crond. It lives in the Compose file, and the Docker Engine fires it. Because the engine owns the schedule, a job keeps firing after the docker compose command has exited, and also when the project targets a remote engine. Each execution is recorded with its state and exit code. ...