After this research, I started trying to look for a solution.
First, quartz-mongo.jar creates and uses the tables on Mongo as if it were a RDB, so I just needed to modify a little bit the Quartz plugin to implement the jar.
My second surprise was that Quartz Plugin doesn’t call a Quartz Job as we usually well know. It calls a generic job, and sends the GrailsJobs as a service to be run by this GenericJob.
The problem here is that Quartz Clustering wasn’t thought this way. It saves all jobs information on the DB, but these aren’t jobs!!!!
I decided to change a little bit the plugin code to read and write the jobs in the DB, so I can handle which “grails job” to execute, of course I keep the jar and plugin code, just overwrite a few classes since I still need it to do other staff like claiming the job, so other app doesn’t try to run it again.
- configuring a scheduler
- overwriting the GrailsJob
- creating a JobStore
- creating the QuartzConfig
- adding all this on the resources.groovy
I’m developing a plugin to fix this, you can check it here .
I have a first version – perfectible – that works.
Hope it helps!