I'm trying to implement some job scheduling using Quartz plugin. I have ScheduledTask domain class:
class ScheduledTask {
String dayOfMonth
Contact suggestedSupport
String status
static constraints = {
dayOfMonth(blank:false,nullable:false)
suggestedSupport(blank:false,nullable:false)
status(blank:false,nullable:false)
}
}
I need the logic to go through all ScheduledTask instances and do some stuff - for each instance the job will be fired on dayOfMonth - for example if dayOfMonth value for specific ScheduledTask instance is 25 the job for that instance will fire 25th day of every month. How can I do this?
Look up the section on "Dynamic Jobs Scheduling" in the plugin docs http://grails.org/plugin/quartz
You need to dynamically create a job for each ScheduledTask instance (probably the instance it is created)
It should be relatively easy to follow the documentation and write your code. If you get stuck something, then post a specific question regarding that on SO.