0.1.3 - Bugfix release fixing a discrepancy between clj-time and cron's
representation of Sunday (thanks dwwoelfel)
*What is Schejulure?*
Schejulure is a lightweight, cron-inspired, minute resolution scheduling
library. It has a neat, concise api and no stateful central scheduler.
It's tiny (~60 lines) and aims to do one task well. It's modelled after
futures, and in fact returns a future, so use it in the same places/way you
might use a future, but for recurring events.
To schedule things, it's like a cron setup (so by default fires every
minute of every hour of every day...) but you can merge a map with lists of
times when it should fire, so for example {:minute [0 15 30 45] :day :tue}
will fire every 15 minutes on a tuesday where {:hour 9} will fire every
minute from 9-10am every day. Beyond that you simply call schedule with
pairs of schedule maps to functions which should fire.
*Example:*
=> (def my-running-scheduler
(schedule {:hour 12 :minute [0 15 30 45]} my-function
{:hour (range 0 24 6) :minute 0 :day [:sat :sun]} batch-job))
...
=> (future-cancel my-running-scheduler)
Simple as that.
--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.