← All notes

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

Sources

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

Permanent ID: iil:note:12dpvwj4

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.},
}

Markdown

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.

All artifact files (JSON index)

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.