{"id":26492746,"url":"https://github.com/scpatt/cronjure","last_synced_at":"2026-05-19T15:37:24.435Z","repository":{"id":62435353,"uuid":"173643287","full_name":"scpatt/cronjure","owner":"scpatt","description":"Clojure wrapper for the cron-utils library","archived":false,"fork":false,"pushed_at":"2025-02-21T16:14:58.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-20T08:03:11.873Z","etag":null,"topics":["clojure","cron","cron-expression","cron-libraries","cron-utils","jvm","quartz"],"latest_commit_sha":null,"homepage":"","language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scpatt.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":"2019-03-03T23:36:59.000Z","updated_at":"2025-02-21T16:15:02.000Z","dependencies_parsed_at":"2025-03-20T08:03:16.868Z","dependency_job_id":"41974d9a-6b6e-42ea-ba32-86df7d1c1111","html_url":"https://github.com/scpatt/cronjure","commit_stats":null,"previous_names":["astronought/cronjure"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scpatt%2Fcronjure","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scpatt%2Fcronjure/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scpatt%2Fcronjure/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scpatt%2Fcronjure/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scpatt","download_url":"https://codeload.github.com/scpatt/cronjure/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244584855,"owners_count":20476623,"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":["clojure","cron","cron-expression","cron-libraries","cron-utils","jvm","quartz"],"created_at":"2025-03-20T09:27:23.581Z","updated_at":"2025-12-12T01:21:42.460Z","avatar_url":"https://github.com/scpatt.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cronjure\n\nCronjure is a thin Clojure wrapper for the popular [cron-utils](https://github.com/jmrozanec/cron-utils) library.\n\n## Installation\n\n### Leiningen\n\n```clojure\n[cronjure \"0.1.1\"]\n```\n\n### Deps.edn\n\n```clojure\n{cronjure {:mvn/version \"0.1.1\"}}\n```\n\n## Usage\n\n```clojure\n(require '[cronjure.core :refer :all])\n```\n\n### Define a custom cron definition\n\n```clojure\n(def my-cron-definition\n  (build-definition\n    with-seconds\n    (with-minutes\n      (with-valid-range 0 60)\n      (with-int-mapping 60 0))\n    with-hours\n    with-day-of-month\n    with-months\n    (with-day-of-week\n      supports-l\n      supports-question-mark)))\n```\n\n### Create a cron instance\n\nCreating a cron instance requires a cron definition, pre-defined definitions can be found\nunder ```cronjure.definitions```.\n\n\n```clojure\n(def my-cron-instance\n  (build-instance my-cron-definition\n    (with-second (on 59))\n    (with-minute (between 15 30))\n    (with-hour (on 10))\n    (with-dow (on 6 cronjure.special-characters/l))\n    (with-month always)))\n```\n\n### String representation\n\n```clojure\n(as-string my-cron-instance) ; =\u003e \"59 15-30 10 * 6L\"\n```\n\n### Describe\n\nTakes an optional locale, uses the default locale if not specified.\n\n```clojure\n(describe my-cron-instance) ; =\u003e \"every minute between 10:15 and 10:30 last Saturday of every month\"\n\n(describe my-cron-instance (java.util.Locale/FRENCH)) ; =\u003e \"chaque minute entre 10:15 et 10:30 dernier samedi de chaque mois\"\n```\n\n### Execution date/time\n\n```clojure\n(next-execution-date my-cron-instance) ; =\u003e java.time.ZonedDateTime\n\n(last-execution-date my-cron-instance) ; =\u003e java.time.ZonedDateTime\n```\n\nTwo similar functions are also provided which return instances of a ```java.time.Duration```.\n\n```clojure\n(time-to-next-execution my-cron-instance) ; =\u003e java.time.Duration\n\n(time-since-last-execution my-cron-instance) ; =\u003e java.time.Duration\n```\n\nA format can be optionally supplied.\n\n```clojure\n(time-to-next-execution my-cron-instance :minutes) ; =\u003e e.g. 42\n\n(time-to-next-execution my-cron-instance :seconds) ; =\u003e e.g. 2520\n```\n\n### Parsing\n\nCron instances can also be created using strings.\n\n```clojure\n(-\u003e\u003e \"0/30 55 18 ? * 1\"\n     (parse cronjure.definitions/quartz)\n     describe\n; =\u003e \"every 30 seconds at 55 minute at 18 hour at Sunday day\"\n```\n\n### Field information\n\nInformation about specific fields can be retrieved from either a cron definition/instance.\n\n```clojure\n(get-instance-field my-cron-instance :minute)\n; =\u003e {:order 1,\n;    :expression \"15-30\",\n;    :constraints {:start-range 0, :end-range 60, :special-chars [\"NONE\"]}}\n\n(get-definition-field my-cron-definition :minute)\n;=\u003e {:optional false,\n;    :constraints {:start-range 0, :end-range 60, :special-chars [\"NONE\"]}}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscpatt%2Fcronjure","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscpatt%2Fcronjure","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscpatt%2Fcronjure/lists"}