我尝试将cron示例用作入门页面: http://clojurequartz.info/articles/getting_started.html
(defjob NoOpJob
[ctx]
(comment "Does nothing"))
(defn -main
[& m]
(let [s (-> (qs/initialize) qs/start)
job (j/build
(j/of-type NoOpJob)
(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
(cron-schedule "0 0 15 ? * 5"))))]
(qs/schedule s job trigger)))
intellij在行中给我“ clojurewerkz.quartzite.jobs/of-type的不正确Arity 1”
(j/of-type NoOpJob)
我检查了api文档: http://reference.clojurequartz.info/clojurewerkz.quartzite.jobs.html#var-of-type
类型的功能有两个方面:
(of-type jb clazz)
有什么问题吗?谢谢!
答案 0 :(得分:1)
http://team-management-tool.test/view-project-team/90是一个宏,它(通过线程宏->
“注入”第一个参数:
(defmacro ^JobDetail build [& body] `(let [jb# (JobBuilder/newJob)] (finalize (-> jb# ~@body))))
您的IDE在这里错误地声明了一个错误。该代码很可能会编译并正常运行。