{"id":16191264,"url":"https://github.com/project0/cronify","last_synced_at":"2026-04-26T23:31:21.119Z","repository":{"id":101091092,"uuid":"117006602","full_name":"project0/cronify","owner":"project0","description":"Run your scheduled jobs in the context to a docker container, discovered by docker labels.","archived":false,"fork":false,"pushed_at":"2020-06-14T10:51:45.000Z","size":14,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-03-03T09:53:59.751Z","etag":null,"topics":["container","cron","discovery","docker","job","label","schedule","scheduler","task"],"latest_commit_sha":null,"homepage":null,"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/project0.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":"2018-01-10T20:22:10.000Z","updated_at":"2024-06-19T07:56:07.038Z","dependencies_parsed_at":null,"dependency_job_id":"6384443d-a7f4-4059-bb81-4bdaac477cae","html_url":"https://github.com/project0/cronify","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"purl":"pkg:github/project0/cronify","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/project0%2Fcronify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/project0%2Fcronify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/project0%2Fcronify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/project0%2Fcronify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/project0","download_url":"https://codeload.github.com/project0/cronify/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/project0%2Fcronify/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32317162,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T23:26:28.701Z","status":"ssl_error","status_checked_at":"2026-04-26T23:26:25.802Z","response_time":129,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["container","cron","discovery","docker","job","label","schedule","scheduler","task"],"created_at":"2024-10-10T07:45:34.758Z","updated_at":"2026-04-26T23:31:21.100Z","avatar_url":"https://github.com/project0.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cronify\nCronify discovers docker by labels for cron like jobs. Jobs are executed in the context of a container.\n\n## Usage\nThe docker client has some extra env variables you can set: `DOCKER_CERT_PATH`, `DOCKER_TLS_VERIFY`, `DOCKER_HOST`\n\n### Run in a docker container\n[Image DockerHub](https://hub.docker.com/r/project0de/cronify)\n\nObviously docker socket is required for api calls to docker.\n\n```bash\ndocker run -ti -v /var/run/docker.sock:/var/run/docker.sock project0de/cronify\n```\n\n## Docker Labels\nTo prevent automatic creation of unwanted rules, container needs to be labeled:\n\n### cronify\nThe label `cronify` enables this container for cronify to use. The value needs to be set to `true`.\n\nCronify is designed to create multiple jobs to a container `cronify.\u003cJOBNAME\u003e.\u003cCONFIG\u003e`.\n\nFurthemore its possible to have multiple success or fail jobs which can be configured in the same way like the casual job `cronify.\u003cJOBNAME\u003e.success/fail.\u003cFAIL/SUCCESS NAME\u003e.\u003cCONFIG\u003e`. This allows us to create a simple pipeline to run (for example cleanup jobs).\n\n### Config\n\n#### Schedule\nSchedule is a **required** option which is only available on the main job.\n\nSchedule this job in a cron expression.\nSee also https://en.wikipedia.org/wiki/Cron#Predefined_scheduling_definitions and https://github.com/gorhill/cronexpr#predefined-cron-expressions\n\n```yaml\n# Run once an hour at the beginning of the hour\ncronify.\u003cJOBNAME\u003e.schedule: 0 0 * * * * *\n```\n\n#### Type\nType is a **required** option. One of the following types are currently implemented:\n\n* `kill`: Sends a posix signal to the container. See also `signal`.\n* `start`: Start a container.\n* `stop`: Stop a container.\n* `restart`: Restart a container.\n* `exec`: Attach and execute a command to an container. Output is currently written to stdout of cronify daemon.\n\n```yaml\n# main job\ncronify.\u003cJOBNAME\u003e.type: exec\n# on success and/or fail\ncronfiy.\u003cJOBNAME\u003e.success/fail.\u003cNAME\u003e.type: restart\n```\n\n#### Container\nContainer specifies the container id or name to run the job on.\nDefaults to the container id where the labels are set on. If the container does not exist at run the job fails!\n\n```yaml\n# main job\ncronify.\u003cJOBNAME\u003e.container: my_container_name\n# on success and/or fail\ncronfiy.\u003cJOBNAME\u003e.success/fail.\u003cNAME\u003e.container: my_cleanup_container\n```\n\n#### Signal\nCurrently only used for the `kill` command. Signal defaults to whatever docker uses by docker `kill` command (usually SIGKILL). This can be set to any posix signal: https://en.wikipedia.org/wiki/Signal_(IPC)#POSIX_signals.\n\nSee also https://github.com/krallin/tini for implementing signal forwarding in docker containers.\n\n```yaml\n# kill container on main job\ncronify.\u003cJOBNAME\u003e.signal: SIGKILL\n# notify reload process on success and/or fail\ncronfiy.\u003cJOBNAME\u003e.success/fail.\u003cNAME\u003e.signal: SIGHUP\n```\n\n\n#### Command\nCurrently only used and **required** for the `exec` command. Executes the specified command. Need to return exit code `0` for success. Note: Docker commands are always specified as array!\n\n```yaml\n# Simple string, will be splitted by space char to an array!:\ncronify.\u003cJOBNAME\u003e.command: /my/bin/or/script arg1 arg2\n# or set more complex command as json formatted array:\n# note: this is example provides a docker-compose yaml syntax!\ncronfiy.\u003cJOBNAME\u003e.success/fail.\u003cNAME\u003e.signal: \u003e\n  [\"/bin/sh\", \"-c\", \"echo 'run a job' \u0026\u0026 sleep 20 \u0026\u0026 echo 'job done' \u0026\u0026 exit 2\"]\n```\n\n#### Timeout\nOptional timeout for the job in golang duration syntax. job will be marked as fail if timout reaches.\n\n```yaml\n# Timeout main job after 60 seconds\ncronify.\u003cJOBNAME\u003e.timeout: 60s\n# second timeout on success/fail job (5 minutes)\ncronfiy.\u003cJOBNAME\u003e.success/fail.\u003cNAME\u003e.timeout: 5m\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fproject0%2Fcronify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fproject0%2Fcronify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fproject0%2Fcronify/lists"}