Hey,
I'm new to quartzite and I'm trying to get a sample app working based on the examples in the docs. Here's the code I'm working with:
(ns acedia.scheduler
(:require [clojurewerkz.quartzite.scheduler :as qs]
[clojurewerkz.quartzite.triggers :as t]
[clojurewerkz.quartzite.schedule.simple :only [schedule with-repeat-count with-interval-in-milliseconds]]))
(defjob NoOpJob
[ctx]
(comment "Does nothing")
(spit "test.txt" "test"))
(defn run []
(qs/initialize)
(qs/start)
(let [
job (j/build
(j/of-type NoOpJob)
(j/using-job-data {:id "123"})
(j/with-identity (j/key "jobs.noop.1")))
trigger (t/build
(t/with-identity (t/key "triggers.1"))
(t/start-now)
(t/with-schedule (schedule
(with-repeat-count 10)
(with-interval-in-milliseconds 200))))]
(qs/schedule job trigger)))
When I execute with `lein run`, the program compiles and launches, but I get the following error:
[11:36][~/code/cronic]$ lein run
Compiling cronic.core
Hello, World!
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
#inst "2013-01-04T16:45:08.198-00:00"
The SLF4J docs seem to indicate this shouldn't be a huge issue, it just defaults to no-op logger. But after this, the program hangs and the scheduled job never executes.
Any ideas?
Thanks,
Jason