grails / grails-quartz

This project provides integration of the Quartz scheduling framework into the Grails Framework
http://grails.org/plugin/quartz
Apache License 2.0
76 stars 90 forks source link

Grails version >= 3.3.0 ,not support disable concurrent of quartz plugin #91

Closed puwanatfx closed 6 years ago

puwanatfx commented 7 years ago

Hello

I'm testing grails 3.3.0.M1 and 3.3.0RC1 and found it's not support disble concurrent job of quartz

compile 'org.grails.plugins:quartz:2.0.12'

disable concurrent job didn't work

def concurrent = false I test with code

class TestJob {

def concurrent = false

static triggers = {
    cron name: 'myTrigger', cronExpression: "0/5 * * * * ?"
}

def execute() {
    // execute job
    log.error('Start:' + new Date())
    sleep(8000)
    log.error('End:' + new Date())
}
}

When I run with grails 3.2.9 , it run fine , but if I run with newer version , I can not disable concurrent job

sdelamo commented 7 years ago

In case you need a fix fast, I am using Schwartz Plugin with 3.3.0.RC1 and the avoid concurrent annotation works.

mamunsrdr commented 7 years ago

Until 2.0.13 is released I'm using the 2.0.13.BUILD-20170829.124724-2.jar version as a local gradle jar dependency (to avoid unstable build I prefer tested local jar) downloaded from grails repo. Notice: this build requires change: job class property declaration to static. For example: static concurrent = false. My build.gradle looks like:

compile "org.quartz-scheduler:quartz:2.3.0"
//compile "org.grails.plugins:quartz:2.0.13.BUILD-SNAPSHOT"
compile files('libs/quartz-2.0.13.BUILD-SNAPSHOT.jar')

Tested with Grails 3.3.0.

erichelgeson commented 6 years ago

What is the root requirement for changing this? I see the docs/commit were updated but not sure why the change was required. Deployed w/o changing this weekend and our jobs just didn't fire so it went unnoticed.