Index: /project/dev/workspaces/groovy-grails/grails-quartz/QuartzGrailsPlugin.groovy =================================================================== --- /project/dev/workspaces/groovy-grails/grails-quartz/QuartzGrailsPlugin.groovy (revision 18964) +++ /project/dev/workspaces/groovy-grails/grails-quartz/QuartzGrailsPlugin.groovy (working copy) @@ -79,7 +79,7 @@ "${ExecutionControlTriggerListener.NAME}"(ExecutionControlTriggerListener) quartzScheduler(SchedulerFactoryBean) { - triggers = schedulerReferences + //triggers = schedulerReferences jobListeners = [ref("${SessionBinderJobListener.NAME}")] globalJobListeners = [ref("${ExceptionPrinterJobListener.NAME}")] globalTriggerListeners = [ref("${ExecutionControlTriggerListener.NAME}")] @@ -89,6 +89,19 @@ def doWithApplicationContext = { applicationContext -> // allow execution of jobs applicationContext.getBean("${ExecutionControlTriggerListener.NAME}").executionAllowed = true + + def scheduler = applicationContext.getBean("quartzScheduler") + if (scheduler) { + application.taskClasses.each { jobClass -> + def fullName = jobClass.fullName + // add job to scheduler, and associate trigger with it + scheduler.scheduleJob(applicationContext.getBean("${fullName}JobDetail"), applicationContext.getBean("${fullName}Trigger")) + log.debug("Job ${jobClass.fullName} scheduled") + } + } + else { + log.warn("failed to register job triggers: scheduler not found") + } } def onChange = { event ->