{"id":21296863,"url":"https://github.com/reddec/compose-scheduler","last_synced_at":"2025-05-07T01:50:36.107Z","repository":{"id":65432675,"uuid":"592260777","full_name":"reddec/compose-scheduler","owner":"reddec","description":"Simple and lightweight service which can execute services from the same file based on cron expression. ","archived":false,"fork":false,"pushed_at":"2024-06-22T07:59:18.000Z","size":22,"stargazers_count":64,"open_issues_count":4,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-03T04:37:55.862Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://reddec.net/articles/portable-stack/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/reddec.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-23T10:42:51.000Z","updated_at":"2025-04-25T18:11:05.000Z","dependencies_parsed_at":"2023-12-29T14:30:29.894Z","dependency_job_id":"badd2765-dc6a-4c44-87b8-053242f7a2bb","html_url":"https://github.com/reddec/compose-scheduler","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reddec%2Fcompose-scheduler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reddec%2Fcompose-scheduler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reddec%2Fcompose-scheduler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reddec%2Fcompose-scheduler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reddec","download_url":"https://codeload.github.com/reddec/compose-scheduler/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252798781,"owners_count":21805880,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-21T14:30:13.010Z","updated_at":"2025-05-07T01:50:36.087Z","avatar_url":"https://github.com/reddec.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Docker-Compose scheduler\n\nSimple and lightweight service which can execute `docker compose run ...` services from the same file based on cron\nexpression. \n\nFeatures:\n\n- Zero-configuration by-default\n- Designed for docker compose (auto-detect, respects namespace)\n- HTTP notifications with retries\n\nInspired by [ofelia](https://github.com/mcuadros/ofelia).\n\n```yaml\nservices:\n  web:\n    image: \"nginx\"\n    labels:\n      - \"net.reddec.scheduler.cron=@daily\"\n      - \"net.reddec.scheduler.exec=nginx -s reload\"\n\n  date:\n    image: busybox\n    restart: \"no\"\n    labels:\n      - \"net.reddec.scheduler.cron=* * * * *\"\n\n  scheduler:\n    image: ghcr.io/reddec/compose-scheduler:1.0.0\n    restart: unless-stopped\n    volumes:\n      - /var/run/docker.sock:/var/run/docker.sock:ro\n```\n\nSupports two modes:\n\n- plain `docker compose run`\n- exec command inside service (extra label `net.reddec.scheduler.exec`)\n\n## Usage\n\n```\nApplication Options:\n      --project=              Docker compose project, will be automatically detected if not set [$PROJECT]\n\nHTTP notification:\n      --notify.url=           URL to invoke [$NOTIFY_URL]\n      --notify.retries=       Number of additional retries (default: 5) [$NOTIFY_RETRIES]\n      --notify.interval=      Interval between attempts (default: 12s) [$NOTIFY_INTERVAL]\n      --notify.method=        HTTP method (default: POST) [$NOTIFY_METHOD]\n      --notify.timeout=       Request timeout (default: 30s) [$NOTIFY_TIMEOUT]\n      --notify.authorization= Authorization header value [$NOTIFY_AUTHORIZATION]\n\nHelp Options:\n  -h, --help                  Show this help message\n```\n\n## Notifications\n\nScheduler will send notifications after each job if `NOTIFY_URL` env variable or `--notify.url` flag set. Each\nnotification is a simple HTTP request.\nHTTP method, attempts number, and interval between attempts can be configured.\nAuthorization via `Authorization` header also supported.\n\nScheduler will stop retries if at least one of the following criteria met:\n\n- reached maximum number of attempts\n- server returned any `2xx` code (ex: `200`, `201`, ...)\n\nOutgoing custom headers:\n\n- `Content-Type: application/json`\n- `User-Agent: scheduler/\u003cversion\u003e`, where `\u003cversion\u003e` is build version\n- `Authorization: \u003cvalue\u003e` (if set)\n\nPayload:\n\n```json\n{\n  \"project\": \"compose-project\",\n  \"service\": \"web\",\n  \"container\": \"deadbeaf1234\",\n  \"schedule\": \"@daily\",\n  \"started\": \"2023-01-20T11:10:39.44006+08:00\",\n  \"finished\": \"2023-01-20T11:10:39.751879+08:00\",\n  \"failed\": true,\n  \"error\": \"exit code 1\"\n}\n```\n\n\u003e field `error` exists only if `failed == true`\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freddec%2Fcompose-scheduler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freddec%2Fcompose-scheduler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freddec%2Fcompose-scheduler/lists"}