feat: add cron scheduling support for one-shot compose services#97
Merged
Conversation
Add a `docker-orchestrate cron` command that runs as a long-lived daemon, scheduling one-shot Compose services based on `x-cron` configuration with structured webhook notifications and multi-project support. New commands: - `cron` -- all-in-one scheduler + spawner + notifier - `cron run` -- scheduler/spawner only - `cron notify` -- notifier only (watches Docker events) - `cron install` -- generates systemd/runit service configs - `cron uninstall` -- removes installed service configs Key features: - Service-level `x-cron` extension with schedule, timezone, timeout, no-overlap, and notify configuration - Project-level `x-cron-defaults` for shared settings - Fire-and-forget container spawning with metadata labels - Durable notifications via container labels (survives restarts) - Multi-project directory scanning with .docker-orchestrate file support - Midnight-pinned @every intervals (stable across restarts) - Timezone resolution: per-service > project defaults > CLI > system - Config hot-reload via periodic re-read and SIGHUP signal - Overlap prevention via running container detection - Orphan container recovery on startup - Deploy/cron mutual exclusivity (x-cron services skipped during deploy)
- Remove duplicate #### Flags and #### Examples headings in command-reference.md - Add language specifier to bare fenced code blocks in cron-scheduling.md - Add blank lines before lists per MD032 rule
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
docker-orchestrate crondaemon that schedules one-shot Compose services on cron expressions via a newx-cronservice extension@everyintervals, config hot-reload (periodic + SIGHUP), overlap prevention, and orphan recoverycron run(scheduler only),cron notify(notifier only),cron install/cron uninstall(systemd/runit service management), and static init templates incontrib/x-cronare automatically skipped duringdocker-orchestrate deploy