{"id":32181710,"url":"https://github.com/collbox/http-cron","last_synced_at":"2026-02-21T12:01:35.942Z","repository":{"id":62431679,"uuid":"476492976","full_name":"collbox/http-cron","owner":"collbox","description":"Service / Clojure library to POST to HTTP endpoints at regular intervals","archived":false,"fork":false,"pushed_at":"2023-05-15T23:13:38.000Z","size":32,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2025-12-02T08:15:39.041Z","etag":null,"topics":["cronjob","elasticbeanstalk","http"],"latest_commit_sha":null,"homepage":"","language":"Clojure","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/collbox.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}},"created_at":"2022-03-31T22:06:21.000Z","updated_at":"2023-01-29T02:18:05.000Z","dependencies_parsed_at":"2022-11-01T20:46:39.420Z","dependency_job_id":null,"html_url":"https://github.com/collbox/http-cron","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/collbox/http-cron","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/collbox%2Fhttp-cron","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/collbox%2Fhttp-cron/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/collbox%2Fhttp-cron/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/collbox%2Fhttp-cron/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/collbox","download_url":"https://codeload.github.com/collbox/http-cron/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/collbox%2Fhttp-cron/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29680147,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T11:29:27.227Z","status":"ssl_error","status_checked_at":"2026-02-21T11:29:20.292Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["cronjob","elasticbeanstalk","http"],"created_at":"2025-10-21T22:50:19.037Z","updated_at":"2026-02-21T12:01:35.936Z","avatar_url":"https://github.com/collbox.png","language":"Clojure","readme":"# http-cron\n\nPOST to HTTP endpoints at regular intervals (to trigger jobs, etc.).\nCan be run as a standalone daemon, reading from a `cron.yaml` file, or\nas a [component][] in a Clojure system.\n\nAlso a drop-in replacement for the process which runs on AWS Elastic\nBeanstalk worker instances in the presence of a `cron.yaml`, providing\nan alternative which can be run in a local environment.\n\n# Running\n\n`http-cron` can run as a standalone CLI application, or as a component\nin a Clojure / Java application.\n\n## Running as a Standalone Service (CLI)\n\nClojure (`clojure`) needs to be installed and available on the `PATH`.\n\nYou can run the application as a [Clojure tool][clj-tool] without\ndownloading the source code.\n\nFirst, install it as a tool:\n\n```sh\nclojure -Ttools install-latest :lib com.github.collbox/http-cron :as http-cron\n```\n\nThen run it with:\n\n```sh\nclojure -Thttp-cron run :file cron.yaml\n```\n\nIf you *do* have the code downloaded and want to run the application\ndirectly from that codebase you can instead use:\n\n```sh\nclojure -X:run :file cron.yaml\n```\n\nIn standalone mode, tasks are configured with a `cron.yaml` file.  By\ndefault, `http-cron` will look for a file with this name in the\nproject root.\n\nAdditional settings can be controlled with command-line arguments, or\nwith environment variables, making the program convenient to run\ndirectly or via a containerization solution like [Docker][].\n\n| Env. Var.            | CLI Argument | Default                 | Description                                                 |\n|----------------------|--------------|-------------------------|-------------------------------------------------------------|\n| `HTTP_CRON_JOB_FILE` | `:file`      | `cron.yaml`             | File name for cron.yaml-style job specification             |\n| `HTTP_CRON_BASE_URL` | `:base-url`  | `http://localhost:8080` | Base URL to POST to                                         |\n| `HTTP_CRON_HOST`     | `:host`      | `localhost`             | Host to POST to (used if `HTTP_CRON_BASE_URL` not provided) |\n| `HTTP_CRON_PORT`     | `:port`      | `8080`                  | Port to POST to (used if `HTTP_CRON_BASE_URL` not provided) |\n\n## Running as a Component in an Application\n\n`http-cron` is built using (Stuart Sierra's) [component][], making it\neasy to run it as part of a larger Clojure system.  The easiest way to\nbuild the component is using the\n`collbox.http-cron.core/make-http-cron` function, passing values for\n`:base-url` and `:job-specs` in the configuration map.\n\nHere's an example of usage which reads the cron jobs from an AWS-style\n`cron.yaml` file, ignoring some jobs (based on their name):\n\n```clj\n(ns myapp.system\n  (:require [collbox.http-cron.conversion :as hc.conv]\n            [collbox.http-cron.core :as hc]\n            [com.stuartsierra.component :as component]))\n\n(defn app-system []\n  (component/map-\u003eSystemMap\n   {:http-cron (hc/make-http-cron\n                {:base-url  \"http://localhost:8080\"\n                 :job-specs (-\u003e\u003e (hc.conv/parse-cron-yaml \"cron.yaml\")\n                                 (remove (comp #{\"backup\"\n                                                 \"data-lake-export\"}\n                                               :name)))})}))\n```\n\nIf you prefer to specify the jobs directly in code (rather than\nloading from a `cron.yaml`) you can simply provide a sequence of maps\nwith `:name`, `:url`, and `:schedule` entries.\n\nn.b. the value of `:schedule` should be a cron specifier string in\n[the format used by Quartz][quartz-cron-expressions], which differs\nslightly from the format supported in the `cron.yaml` file.\n\n# Dependency Information\n\nTo add `http-cron` to your Clojure project, use one of the following:\n\n**Leiningen/Boot**\n\n```clj\n[co.collbox/http-cron \"0.3.0\"]\n```\n\n**Clojure CLI/deps.edn**\n\n```clj\nco.collbox/http-cron {:mvn/version \"0.3.0\"}\n```\n\n# Cron Job Configuration\n\nIf you're using a `cron.yaml` file, it should be in the following\nformat:\n\n```yaml\nversion: 1\ncron:\n  - name: \"brew-the-coffee\"\n    url: \"/jobs/coffee\"\n    schedule: \"0 7 * * 1-5\"\n  - name: \"make-magic\"\n    url: \"/jobs/magic\"\n    schedule: \"0/15 * * * *\"\n```\n\nThe fields of the cron specification are:\n\n`minute hour day-of-month month day-of-week`\n\nYou can also provide a full URL for `url`, rather than a URL fragment,\nand `http-cron` will use that URL, ignoring the value of\n`HTTP_CRON_BASE_URL`.\n\n# AWS Elastic Beanstalk Worker Compatibility\n\n`http-cron` is designed to be a drop-in replacement for the similar\nservice which runs on Elastic Beanstalk worker instances.  Towards\nthat end, it:\n\n- Supports the same `cron.yaml` file format (or as much of it as I can\n  suss out, given the lack of a specification).\n- Provides `x-aws-sqsd-path` and `x-aws-sqsd-taskname` HTTP headers.\n\nThe AWS `cron.yaml` format differs somewhat from the capabilities\nprovided by some other services like Google App Engine, though this\nproject could likely be extended to support other popular formats--PRs\nare welcome.\n\n# License\n\nCopyright © 2023 Collbox Inc.\n\nDistributed under the MIT License.\n\n[clj-tool]: https://clojure.org/reference/deps_and_cli#_tool_usage\n[component]: https://github.com/stuartsierra/component\n[docker]: https://www.docker.com\n[quartz-cron-expressions]: http://www.quartz-scheduler.org/documentation/quartz-2.3.0/tutorials/crontrigger.html\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcollbox%2Fhttp-cron","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcollbox%2Fhttp-cron","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcollbox%2Fhttp-cron/lists"}