Skip to content

Instantly share code, notes, and snippets.

@bbbates
Created January 3, 2014 03:27
Show Gist options
  • Save bbbates/8232144 to your computer and use it in GitHub Desktop.
Save bbbates/8232144 to your computer and use it in GitHub Desktop.
Using leader-guarantee to activate a quartz scheduler
(ns my-app.scheduler
(:use leader-guarantee.core
confijulate.core)
(:require [clojurewerkz.quartzite.scheduler :as qs]))
(defn initialise
"The initialisation function for the scheduling system"
[]
(when (get-cfg :jobs :enable-schedule) ;; Still may want to disable schedule in local dev environment
(when-leader "my-app-cluster"
(qs/start))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment