mirror of
https://github.com/docker/compose.git
synced 2026-11-23 16:40:25 +00:00
A job with a schedule is registered through the engine's jobs extension, which fires it on its own clock; create and up register it, up stays re-runnable since Create is idempotent on the spec hash, and a full down removes the jobs. The extension ships disabled by default and cannot be listed, so Compose probes it with a List scoped to the project; when the engine cannot run jobs, up, create and start refuse the project before creating anything, and down ignores the jobs. A job the file no longer declares is reported by up and removed by --remove-orphans, unless its run is in progress. The spec is stable: sorted entries, no volatile labels, services referenced by container name. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Guillaume Lours <glours@users.noreply.github.com>
11 lines
179 B
YAML
11 lines
179 B
YAML
services:
|
|
web:
|
|
image: alpine
|
|
init: true
|
|
command: sleep infinity
|
|
jobs:
|
|
migrate:
|
|
image: alpine
|
|
command: echo migration done
|
|
triggers:
|
|
manual: true
|