What's Changed
ℹ️ Scheduled jobs are now supported. A job is a one-shot unit of work declared in the top-level
jobs:element of your Compose file, run on demand or on a schedule.
Scheduling needs Docker Engine 29.10 or later with the jobs extension enabled (it is off by default:dockerd --extension-enable org.mobyproject.jobs.v0). Manual jobs keep working on any engine, and projects that declare no jobs are unaffected.
services:
db:
image: postgres
jobs:
backup:
image: backup-tool
depends_on: [db]
triggers:
schedule:
- cron: "0 3 * * *"
docker compose up(orcreate) registers the scheduled jobs with the engine, which fires them on its own clock;docker compose downremoves them. On an engine without jobs support,uprefuses a project with scheduled jobs before creating anything.docker compose run backuptriggers a job right away: its dependencies start first, its logs are streamed and its exit code is returned. On an engine without jobs support, it runs as a one-off service with a warning, as before.
✨ Improvements
Jobs
Full Changelog: v5.7.2...v5.8.0