Last active
January 2, 2016 01:28
-
-
Save bbbates/8230170 to your computer and use it in GitHub Desktop.
Enabling scheduling on a single node with Confijulate
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns | |
^:cfj-config | |
my-app.config | |
(:require [confijulate.core :as cfj])) | |
(def ^:cfj-base base-config | |
{ | |
:jobs | |
{:enable-schedule false} ;;disabled by default | |
} | |
) | |
(ns my-app.scheduler | |
(:use [confijulate.core :only [get-cfg]) | |
(:require [clojurewerkz.quartzite.scheduler :as qs])) | |
(defn initialise | |
"The initialisation function for the scheduling system" | |
[] | |
(when (get-cfg :jobs :enable-schedule) | |
(qs/start))) | |
;; Use the -Dcfj.jobs.enable-schedule=true command line arg to switch the scheduler on for a node |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment