Crontab parsing library for Clojure.
Supports vixie-cron
syntax. Generates a lazy sequence of java.time.ZonedDateTime
objects
in UTC timezone that satisfy given crontab
conditions.
(require '[org.pilosus.kairos :as kairos])
;; parse crontab string into a map
(kairos/parse-cron "39 9 * * wed-fri")
;; generate a lazy sequence of java.time.ZonedDateTime[UTC] objects
;; that satisfy given crontab constraints
(kairos/get-dt-seq "0 10 3,7 Dec Mon")
;; generate Date-Time sequence for a range of years
;; range from/to behaves like the one in clojure.core/range
(kairos/get-dt-seq "39 9 * * wed-fri" 2023 2029)
See LICENSE
Can you improve this documentation?Edit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close