This fork publishes to Clojars under a new group ID:
;; before
[clojurewerkz/quartzite "2.2.0"]
;; now
[io.github.vincentjames501/quartzite "2.3.0"]
The Clojure namespaces are unchanged (clojurewerkz.quartzite.*), so only the dependency
coordinates need updating. Note that the old and new artifacts must not be on the classpath at the
same time — they provide the same namespaces.
The exported clj-kondo configuration moved accordingly, from
clj-kondo.exports/clojurewerkz/quartzite to clj-kondo.exports/io.github.vincentjames501/quartzite.
The clj-time/Joda Time dependency is gone and the DateConversion protocol is no longer extended
to org.joda.time types, even when Joda Time is on the classpath.
DateConversion now covers java.util.Date, java.util.Calendar and the java.time types
(Instant, OffsetDateTime, ZonedDateTime, LocalDateTime, LocalDate).
This is a breaking change. Code that passed Joda Time objects to triggers/start-at,
triggers/end-at and friends should either convert to java.time or extend
clojurewerkz.quartzite.conversion/DateConversion itself.
Quartz has been upgraded from 2.4.0 to 2.5.2. The 2.5.0
upgrade had previously been deferred pending
quartz-scheduler/quartz#1298; the
dependency now moves directly to 2.5.2.
The default Clojure dependency (and the 1.12 test profile) moved from 1.12.0 to 1.12.5.
Development-only dependencies were bumped as well: org.clojure/tools.logging to 1.3.1 and
org.slf4j/slf4j-log4j12 to 2.0.18.
DateConversion Fixes for LocalDateTime and LocalDateto-date threw for both types — IllegalArgumentException for LocalDateTime and
ClassCastException for LocalDate. ZoneId/systemDefault had been written without parentheses,
which Clojure 1.12 compiles to a method value rather than a call, so a function was passed where a
ZoneId was expected.
to-date is now also tagged as returning java.util.Date, so triggers/start-at and
triggers/end-at no longer reflect against the startAt(java.time.Instant) overload Quartz 2.5
added. Note that this means implementations of DateConversion are expected to honour the
protocol's contract and return a java.util.Date.
Quartzite now exports clj-kondo configuration, including
hooks for the jobs/build, triggers/build and schedule threading macros, so that linting
Quartzite DSL code no longer reports spurious arity errors. Lint issues in the library itself have
been addressed.
GitHub issue: #46
Contributed by @vincentjames501.
To address a number of CVEs.
GitHub issue: #45
Contributed by @kevin-ewing.
get-job and get-trigger Fixesclojurewerkz.quartzite.scheduler/get-job and /get-trigger now use correct
order of arguments for key group and key.
Contributed by songsd and Ryan Fowler.
get-matching-jobs Fixesclojurewerkz.quartzite.scheduler/get-matching-jobs now returns jobs (as advertised).
Contributed by Przemysław Wojnowski.
When job maps are converted to JobDataDetails used by Quartz, all keys are
now stringified and nested maps are ignored.
Contributed by Nikita Beloglazov.
The project now depends on clj-time 0.14.0.
Contributed by Nikita Beloglazov, Przemysław Wojnowski, Ryan Fowler.
Following our commitment to make our projects rely less on dynamic vars we
have changed clojurewerkz.quartzite.scheduler function to take an explicit
scheduler argument.
So, in 1.3 releases, you would do:
(require '[clojurewerkz.quartzite.scheduler :as qs])
(qs/initialize)
(qs/start)
(qs/schedule job-detail trigger)
(qs/shutdown)
and in 2.0 release, the same code would look like so:
(require '[clojurewerkz.quartzite.scheduler :as qs])
(let [s (-> (qs/initialize) qs/start)]
(qs/schedule s job-detail trigger)
(qs/shutdown s))
clojurewerkz.quartzite.date-time was removed as all of the functions in that
namespace have been contributed to clj-time a while ago, and some provide more
correct or extensible functionality.
Simply use clj-time counterparts when upgrading.
The library no longer supports Clojure 1.4 and 1.5 as of this version.
The library now depends on Clojure 1.6.
clj-time dependency has been upgraded to version 0.8.0.
Quartzite requires Clojure 1.4+ as of this version.
clj-time dependency has been upgraded to version 0.6.0.
clojurewerkz.quartzite.scheduler/get-currently-executing-jobs returns a set of currently executing jobs.clojurewerkz.quartzite.scheduler/currently-executing-job? returns true there is a running job for a given key.1.1.x has one breaking API change in how it converts job context
maps to JobDetailContext in Quartz.
clj-time dependency has been upgraded to version 0.5.0, uses Joda Time 2.2.
clojurewerkz.quartzite.date-time functions were pushed upstream to clj-time, find them in
clj-time.core and clj-time.periodic.
clojurewerkz.quartzite.date-time will be removed from Quartzite in the release following
1.1.0.
Quartzite will now stringify all keys in Clojure maps converted to job detail context instances. This is due to the fact that some Quartz internals implicitly assume JobDetailContext keys are always strings.
Quartzite now depends on org.clojure/clojure version 1.5.0. It is
still compatible with Clojure 1.3+ and if your project.clj depends on
a different version, it will be used, but 1.5 is the default now.
We encourage all users to upgrade to 1.5, it is a drop-in replacement for the majority of projects out there.
clojurewerkz.quartzite.scheduler/unschedule-job was renamed to clojurewerkz.quartzite.scheduler/delete-trigger,
clojurewerkz.quartzite.scheduler/unschedule-jobs was renamed to clojurewerkz.quartzite.scheduler/delete-triggers.
The old functions are deprecated but not removed.
Quartzite now depends on org.clojure/clojure version 1.4.0. It is still compatible with Clojure 1.3 and if your project.clj depends
on 1.3, it will be used, but 1.4 is the default now.
We encourage all users to upgrade to 1.4, it is a drop-in replacement for the majority of projects out there.
clojurewerkz.quartzite.stateful/def-stateful-job is a new macro for defining stateful jobs. It has exactly
the same API signature as as clojurewerkz.quartzite.jobs/defjob.
Contributed by dlebrero.
Added clojurewerkz.quartzite.scheduler/get-job-group-names and clojurewerkz.quartzite.scheduler/get-trigger-group-names, that
could be used to retrieve lists of jobs and triggers.
clojurewerkz.quartzite.scheduler/get-trigger and clojurewerkz.quartzite.scheduler/get-job return trigger and job instances
for the supplied collections of keys.
clojurewerkz.quartzite.scheduler/get-matching-triggers function combines
clojurewerkz.quartzite.scheduler/get-trigger-keys with clojurewerkz.quartzite.scheduler/get-triggers.
clojurewerkz.quartzite.scheduler/get-matching-jobs works the same way for jobs.
clojurewerkz.quartzite.scheduler/get-trigger and clojurewerkz.quartzite.scheduler/get-job return trigger and job instances
for the supplied key. clojurewerkz.quartzite.conversion/from-trigger and clojurewerkz.quartzite.conversion/from-job-detail can be
used to produce Clojure maps from those instances (for example, for easy serialization to JSON or any other format)
clojurewerkz.quartzite.matchers namespaces provides factory functions that instatiate various group matchers.
Group matchers are used to retrieve trigger and job keys using functions in the clojurewerkz.quartzite.scheduler
namespace:
(ns my.service
(:require [clojurewerkz.quartzite.scheduler :as s]
[clojurewerkz.quartzite.matchers :as m]))
;; initialize the scheduler, add some triggers and jobs
;; ...
;; retrieve a set of trigger keys in the group "billing"
(s/get-trigger-keys (m/group-equals "billing"))
;; retrieve a set of job keys in all groups that start with "emails"
(s/get-job-keys (m/group-starts-with "emails"))
Quartz Scheduler was upgraded to version 2.1.5.
clj-time dependency has been upgraded to version 0.4.2, uses Joda Time 2.1.
clojurewerkz.quartzite.conversions/to-date was introduced to convert various inputs (for example,
variosu Joda Time date/time objects) to java.util.Date. This makes it possible to use Joda Time objects
in the trigger builder DSL:
(t/build
;; uses an org.joda.time.DateTime instance
(t/start-at (-> 2 secs from-now))
(t/with-schedule (calin/schedule
(calin/with-interval-in-seconds 2))))
clojurewerkz.quartzite.scheduler/maybe-schedule is a variation of clojurewerkz.quartzite.scheduler/schedule
that won't schedule (trigger, job) pair more than once. It thus avoids org.quartz.ObjectAlreadyExistsException
exceptions that Quartz will raise when one attempts to schedule the same job on the same trigger/schedule more
than once.
clj-time dependency has been upgraded to version 0.4.1.
clojurewerkz.quartzite.scheduler/all-scheduled? is a convenient way to check if several keys
(trigger or job) are scheduled.
clojurewerkz.quartzite.conversion/from-job-data now can work with JobExecutionContext instances.
Several date/time functions extracted from various apps that use Quartzite will be
incubating in the clojurewerkz.quartzite.date-time namespace for possible inclusion
into clj-time. date/time functions are very relevant to Quartzite and thus depending
on clj-time and providing additional functions makes sense.
Quartzite now uses Leiningen 2.
Can you improve this documentation? These fine people already did:
Michael S. Klishin, Michael Klishin, Vincent Pizzo, Iván Perdomo & Oleksandr PetrovEdit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |