ISO_8601 Scheduling for Clojure
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Travis Badge

For scheduling task according to limited Repeating Time Interval Syntax of ISO 8601.


Clojars Project


nolan is a customizable scheduler which can schedule according to ISO_8601 syntax of Repeating Time Interval. It can be customized to make the schedules persistent to datastore of users choice by implementing a simple protocol.

(use 'nolan.core)

nolan comes with a inbuilt in-memory scheduler which keeps all schedules in a atom and its implementation can be used as a starting point for implementing custom schedulers.

(def sc (get-mem-scheduler))

in-memory scheduler can be used to schedule functions directly.

(add-schedule sc "R4//" #(println "ok")) ; schedule 4 times starting from `now` and tail previous execution
(def scid (add-schedule sc "R//PT2S" #(println "ok"))) ; schedule indefinitely starting from `now` every 2 seconds

add-schedule returns a schedule id which can be used to expire a scehdule which stops all further executions and removes it from schedule store.

(expire sc scid)
(expired? s cscid) ;=> true

Custom Schedule Stores

MemScheduleStore in namespace can be used as a reference for implementing custom stores by extending protocol ScheduleStore.


Copyright © 2014 kul

Distributed under the Eclipse Public License.