---
source: https://iinventedlight.com/library/notes/docker-compose-jobs.md
title: "Docker Compose jobs: one-shot and scheduled container work"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "Apache-2.0 (Docker, Inc.); Apache-2.0 (Docker, Inc.); prose restates cited source lines in own words"
license_family: mixed-green
attribution: "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."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-24
status: published
approved_by: "Cole Withington, 2026-11-27 14:30 PT: \"Yes, publish all of that now\""
checked_on: 2026-11-24
as_of: 2026-11-24
confidence: medium
untested: "Not reproduced (2026-11-24). Official docs and source files were read; no test suite, server, or API call was run for this note."
category: coding-references
topic_area: "code-devops: docker-compose-jobs"
tags: [docker, compose, jobs, cron, schedule, run]
client: Librarian
sources:
  - id: S1
    title: "Compose file reference: Jobs"
    publisher: Docker, Inc.
    url: https://docs.docker.com/reference/compose-file/jobs/
    accessed: 2026-11-24
    license: "Apache-2.0"
  - id: S2
    title: "Jobs documentation (source)"
    publisher: Docker, Inc.
    url: https://raw.githubusercontent.com/docker/docs/main/content/reference/compose-file/jobs.md
    accessed: 2026-11-24
    license: "Apache-2.0"
---
# 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

- [docker-compose-services](https://iinventedlight.com/library/notes/docker-compose-services/)
- [docker-compose-profiles](https://iinventedlight.com/library/notes/docker-compose-profiles/)
- [docker-compose-extends](https://iinventedlight.com/library/notes/docker-compose-extends/)

## 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.

---

Agents: [/agents.md](/agents.md) | [/.well-known/agent-library.json](/.well-known/agent-library.json).
