A cron-like schedule (with cron-style string parser) for clojure
Clojure
Latest commit f0f8ffe Apr 8, 2015 @kognate Update README.md
Permalink
Failed to load latest commit information.
doc updated docs. Mar 7, 2012
src/cl_cronlike Bugfix: match on 24-hour clock, not 12 hour. Apr 8, 2015
test/cl_cronlike/test Add start-ts option for mocking start time, FIX month, day of week #s Apr 2, 2015
.gitignore
README.md Update README.md Apr 8, 2015
project.clj

README.md

clj-cronlike

clj-cronlike is a clojure library that allows for the scheduling of functions to be called using a Vixie Cron-style schedule string.

Usage

Add [cl-cronlike "0.1.7"] to your project file if you are using lien.

(ns foo
  (:require [cl-cronlike.core :as cron]))
  
(defn hello! []
  (println "Hello world!" (System/currentTimeMillis)))
  
(let [runner (cron/create-runner)]
  (cron/start-runner runner)
  (cron/add-function runner "0,15,30,45 * * * *" :hello hello!)
  ...
  (cron/remove-function runner :hello)
  (cron/stop-runner runner))

See the docs for more. http://kognate.github.com/clj-cronlike/doc/

License

Copyright (C) 2012 - 2015 Joshua B. Smith

Distributed under the Eclipse Public License, the same as Clojure.