diff --git a/src/main/groovy/com/agileorbit/schwartz/SchwartzGrailsPlugin.groovy b/src/main/groovy/com/agileorbit/schwartz/SchwartzGrailsPlugin.groovy index 60bb058..d9a5a52 100644 --- a/src/main/groovy/com/agileorbit/schwartz/SchwartzGrailsPlugin.groovy +++ b/src/main/groovy/com/agileorbit/schwartz/SchwartzGrailsPlugin.groovy @@ -67,6 +67,11 @@ class SchwartzGrailsPlugin extends Plugin { }} void doWithApplicationContext() { + if (!grailsApplication.config.getProperty('quartz.pluginEnabled', Boolean, true)) { + log.info 'Not initializing, quartz.pluginEnabled is false' + return + } + applicationContext.getBean('quartzJobFactory', SchwartzJobFactory).init() applicationContext.getBean('quartzService', QuartzService).init()