Reputation: 147
hi there I'm using quartz plugin for grails. when i have just 1 job (i used "create-job" command) everything works as expected! this is how the job looks like and it will print every 1 second:
class MyFirstJob{
def concurrent = false
static triggers = {
simple name: 'myFirstJobTrigger', startDelay: 1000, repeatInterval: 1000 }
def group = "MyGroup"
def execute(){
println "MyFirstJob run!"
}
}
now if i add another job that should print every 5 sec that look like this:
class MySecondJob{
def concurrent = false
static triggers = {
simple name: 'mySecondJobTrigger', startDelay: 1000, repeatInterval: 5000 }
def group = "MyGroup"
def execute(){
println "MySecondJob run!"
}
}
what will happen now is that job1 will start working only every 5 seconds it seems that quartz pluging can only have 1 job schedule i was wondering what am i missing or doing wrong
i even tried the next 2 lines in a file called quartz.properties under conf directory:
org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool
org.quartz.threadPool.threadCount = 10
thanks for your help
Upvotes: 1
Views: 1301
Reputation: 4572
The plugin requires the job class filename to end in 'Job'. Therefore, make sure that MyJob2 is in a file named 'My2Job.groovy' in the job folder
Upvotes: 1