Docker Compose jobs: one-shot and scheduled container work
Answer: A Compose job can run by hand, on a cron schedule, or both.
Jobs and services
Jobs and services share one namespace.
A service can't set depends on to a job.
Jobs are experimental and need the jobs extension turned on in Docker Engine.
A job definition supports all attributes defined in the Container specification and the Workload specification.
Dependencies and profiles
Docker Engine records every execution of a job with its state and exit code.
A job can only extend another job, and a service can only extend another service.
Compose returns an error when a service and a job have the same name.
Docker Engine does not evaluate depends on when it starts a scheduled job.
See also
Claims
- id: C1 claim: A Compose job can run by hand, on a cron schedule, or both. source: S1 evidence: "on a cron schedule, or both"
- id: C2 claim: Jobs and services share one namespace. source: S1 evidence: "Jobs and services share one namespace"
- id: C3 claim: Jobs are experimental and need the jobs extension turned on. source: S1 evidence: "Jobs are experimental and need the jobs extension turned on"
- id: C4 claim: Docker Engine records every execution of a job with its state and exit code. source: S2 evidence: "records every execution of a job with its state and exit code"
Sources
- [S1] Compose file reference: Jobs. Docker, Inc.. https://docs.docker.com/reference/compose-file/jobs/ . License: Apache-2.0. Accessed 2026-11-24.
- [S2] Jobs documentation (source). Docker, Inc.. https://raw.githubusercontent.com/docker/docs/main/content/reference/compose-file/jobs.md . License: Apache-2.0. Accessed 2026-11-24.
License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: Docker, Inc., Compose file reference: Jobs; Docker, Inc., Jobs documentation (source). Apache-2.0 (https://raw.githubusercontent.com/docker/docs/main/LICENSE). Copyright Docker, Inc. Text was condensed and changed from the originals.
License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: Docker, Inc., Compose file reference: Jobs; Docker, Inc., Jobs documentation (source). Apache-2.0 (https://raw.githubusercontent.com/docker/docs/main/LICENSE). Copyright Docker, Inc.
Cite this
iinventedlight. 2026. "Docker Compose jobs: one-shot and scheduled container work." iinventedlight Library, iil:note:12dpvwj4, version of 2026-11-24. https://iinventedlight.com/library/notes/docker-compose-jobs/. License: CC-BY-4.0.
@misc{iil_note_12dpvwj4,
author = {{iinventedlight}},
title = {{Docker Compose jobs: one-shot and scheduled container work}},
howpublished = {iinventedlight Library},
year = {2026},
date = {2026-11-24},
url = {https://iinventedlight.com/library/notes/docker-compose-jobs/},
note = {Permanent ID iil:note:12dpvwj4. License: CC-BY-4.0.},
}
Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).
Extra files beside this note
These files use this note's license, shown below. Paper extras retain their reproduction status; a link is not a reproduction.
- docker-compose-jobs.schema.json (schema; CC-BY-4.0)
- docker-compose-jobs.table.json (table; CC-BY-4.0)
For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/docker-compose-jobs.md.