Quartz2 plugin job triggers immediately instead of at startTime

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Quartz2 plugin job triggers immediately instead of at startTime

Sitati Kituyi
Hi all,

I'm using the Quartz2 plugin to trigger a job programatically. The job should run once, X minutes after a certain user action. I'm having trouble getting this to work - the job always triggers immediately instead of at the specified time.

My first approach was to use the .schedule(date, dataMap) helper method:

ReportSmssyncTimeoutJob.schedule(sendTime, [connectionId:params.id])

I also tried using a trigger:

def trigger = TriggerHelper.simpleTrigger(new JobKey("test"), sendTime, 0, 1, [connectionId:params.id])
ReportSmssyncTimeoutJob.schedule(trigger)

In both cases, the job triggers immediately instead of at sendTime. I've tried doing this with the original quartz plugin, and the first approach works as expected, but I'm working on a project with many jobs set up for the quartz2 plugin so switching plugins is probably not an option. All of these use CronTriggers or are triggered immediately - this is the first time we've had to set up a delay before triggering a dynamically invoked job.

I've also asked on StackOverflow, but haven't had any luck with that.

Thanks,

Sitati

--
Sitati Kituyi
Reply | Threaded
Open this post in threaded view
|

Re: Quartz2 plugin job triggers immediately instead of at startTime

Vitalii Samolovskikh aka Kefir
Hi Sitati,

It's bug in TriggerHelper. You can add issue on github https://github.com/9ci/grails-quartz2/issues?state=open but it will be resolved is incredible. You can resolve it yourself.
Most of developers switched to quartz plugin, but it's unstable too.

On 24.01.2013 18:55, Sitati Kituyi wrote:
Hi all,

I'm using the Quartz2 plugin to trigger a job programatically. The job should run once, X minutes after a certain user action. I'm having trouble getting this to work - the job always triggers immediately instead of at the specified time.

My first approach was to use the .schedule(date, dataMap) helper method:

ReportSmssyncTimeoutJob.schedul
e(sendTime, [connectionId:params.id])

I also tried using a trigger:

def trigger = TriggerHelper.simpleTrigger(new JobKey("test"), sendTime, 0, 1, [connectionId:params.id])
ReportSmssyncTimeoutJob.schedule(trigger)

In both cases, the job triggers immediately instead of at sendTime. I've tried doing this with the original quartz plugin, and the first approach works as expected, but I'm working on a project with many jobs set up for the quartz2 plugin so switching plugins is probably not an option. All of these use CronTriggers or are triggered immediately - this is the first time we've had to set up a delay before triggering a dynamically invoked job.

I've also asked on StackOverflow, but haven't had any luck with that.

Thanks,

Sitati

--
Sitati Kituyi

Reply | Threaded
Open this post in threaded view
|

Re: Quartz2 plugin job triggers immediately instead of at startTime

basejump (Josh)
I"m releasing a new version today. If you know where the bug is then please send the fix over

On Jan 24, 2013, at 7:30 AM, Vitalii Samolovskikh wrote:

Hi Sitati,

It's bug in TriggerHelper. You can add issue on github https://github.com/9ci/grails-quartz2/issues?state=open but it will be resolved is incredible. You can resolve it yourself.
Most of developers switched to quartz plugin, but it's unstable too.

On 24.01.2013 18:55, Sitati Kituyi wrote:
Hi all,

I'm using the Quartz2 plugin to trigger a job programatically. The job should run once, X minutes after a certain user action. I'm having trouble getting this to work - the job always triggers immediately instead of at the specified time.

My first approach was to use the .schedule(date, dataMap) helper method:

ReportSmssyncTimeoutJob.schedul
e(sendTime, [connectionId:params.id])

I also tried using a trigger:

def trigger = TriggerHelper.simpleTrigger(new JobKey("test"), sendTime, 0, 1, [connectionId:params.id])
ReportSmssyncTimeoutJob.schedule(trigger)

In both cases, the job triggers immediately instead of at sendTime. I've tried doing this with the original quartz plugin, and the first approach works as expected, but I'm working on a project with many jobs set up for the quartz2 plugin so switching plugins is probably not an option. All of these use CronTriggers or are triggered immediately - this is the first time we've had to set up a delay before triggering a dynamically invoked job.

I've also asked on StackOverflow, but haven't had any luck with that.

Thanks,

Sitati

--
Sitati Kituyi


Reply | Threaded
Open this post in threaded view
|

Re: Quartz2 plugin job triggers immediately instead of at startTime

Vitalii Samolovskikh aka Kefir
Half an hour please.

On 24.01.2013 21:40, Josh (basejump) wrote:
I"m releasing a new version today. If you know where the bug is then please send the fix over

On Jan 24, 2013, at 7:30 AM, Vitalii Samolovskikh wrote:

Hi Sitati,

It's bug in TriggerHelper. You can add issue on github https://github.com/9ci/grails-quartz2/issues?state=open but it will be resolved is incredible. You can resolve it yourself.
Most of developers switched to quartz plugin, but it's unstable too.

On 24.01.2013 18:55, Sitati Kituyi wrote:
Hi all,

I'm using the Quartz2 plugin to trigger a job programatically. The job should run once, X minutes after a certain user action. I'm having trouble getting this to work - the job always triggers immediately instead of at the specified time.

My first approach was to use the .schedule(date, dataMap) helper method:

ReportSmssyncTimeoutJob.schedul
e(sendTime, [connectionId:params.id])

I also tried using a trigger:

def trigger = TriggerHelper.simpleTrigger(new JobKey("test"), sendTime, 0, 1, [connectionId:params.id])
ReportSmssyncTimeoutJob.schedule(trigger)

In both cases, the job triggers immediately instead of at sendTime. I've tried doing this with the original quartz plugin, and the first approach works as expected, but I'm working on a project with many jobs set up for the quartz2 plugin so switching plugins is probably not an option. All of these use CronTriggers or are triggered immediately - this is the first time we've had to set up a delay before triggering a dynamically invoked job.

I've also asked on StackOverflow, but haven't had any luck with that.

Thanks,

Sitati

--
Sitati Kituyi



Reply | Threaded
Open this post in threaded view
|

Re: Quartz2 plugin job triggers immediately instead of at startTime

Vitalii Samolovskikh aka Kefir
In reply to this post by basejump (Josh)
I just created pull request.

On 24.01.2013 21:40, Josh (basejump) wrote:
I"m releasing a new version today. If you know where the bug is then please send the fix over

On Jan 24, 2013, at 7:30 AM, Vitalii Samolovskikh wrote:

Hi Sitati,

It's bug in TriggerHelper. You can add issue on github https://github.com/9ci/grails-quartz2/issues?state=open but it will be resolved is incredible. You can resolve it yourself.
Most of developers switched to quartz plugin, but it's unstable too.

On 24.01.2013 18:55, Sitati Kituyi wrote:
Hi all,

I'm using the Quartz2 plugin to trigger a job programatically. The job should run once, X minutes after a certain user action. I'm having trouble getting this to work - the job always triggers immediately instead of at the specified time.

My first approach was to use the .schedule(date, dataMap) helper method:

ReportSmssyncTimeoutJob.schedul
e(sendTime, [connectionId:params.id])

I also tried using a trigger:

def trigger = TriggerHelper.simpleTrigger(new JobKey("test"), sendTime, 0, 1, [connectionId:params.id])
ReportSmssyncTimeoutJob.schedule(trigger)

In both cases, the job triggers immediately instead of at sendTime. I've tried doing this with the original quartz plugin, and the first approach works as expected, but I'm working on a project with many jobs set up for the quartz2 plugin so switching plugins is probably not an option. All of these use CronTriggers or are triggered immediately - this is the first time we've had to set up a delay before triggering a dynamically invoked job.

I've also asked on StackOverflow, but haven't had any luck with that.

Thanks,

Sitati

--
Sitati Kituyi



Reply | Threaded
Open this post in threaded view
|

Re: Quartz2 plugin job triggers immediately instead of at startTime

basejump (Josh)
new Quartz2 plugin released, v2.1.6.2 with your changes (as well as a few others)
Thanks for the pull request

On Jan 24, 2013, at 10:13 AM, Vitalii Samolovskikh aka Kefir wrote:

I just created pull request.

On 24.01.2013 21:40, Josh (basejump) wrote:
I"m releasing a new version today. If you know where the bug is then please send the fix over

On Jan 24, 2013, at 7:30 AM, Vitalii Samolovskikh wrote:

Hi Sitati,

It's bug in TriggerHelper. You can add issue on github https://github.com/9ci/grails-quartz2/issues?state=open but it will be resolved is incredible. You can resolve it yourself.
Most of developers switched to quartz plugin, but it's unstable too.

On 24.01.2013 18:55, Sitati Kituyi wrote:
Hi all,

I'm using the Quartz2 plugin to trigger a job programatically. The job should run once, X minutes after a certain user action. I'm having trouble getting this to work - the job always triggers immediately instead of at the specified time.

My first approach was to use the .schedule(date, dataMap) helper method:

ReportSmssyncTimeoutJob.schedul
e(sendTime, [connectionId:params.id])

I also tried using a trigger:

def trigger = TriggerHelper.simpleTrigger(new JobKey("test"), sendTime, 0, 1, [connectionId:params.id])
ReportSmssyncTimeoutJob.schedule(trigger)

In both cases, the job triggers immediately instead of at sendTime. I've tried doing this with the original quartz plugin, and the first approach works as expected, but I'm working on a project with many jobs set up for the quartz2 plugin so switching plugins is probably not an option. All of these use CronTriggers or are triggered immediately - this is the first time we've had to set up a delay before triggering a dynamically invoked job.

I've also asked on StackOverflow, but haven't had any luck with that.

Thanks,

Sitati

--
Sitati Kituyi




Reply | Threaded
Open this post in threaded view
|

Re: Quartz2 plugin job triggers immediately instead of at startTime

Sitati Kituyi
I just updated and can confirm that both of the approaches I attempted now work fine.

Thanks Josh and Vitalii for such a quick fix.


On 26 January 2013 00:58, Josh (basejump) <[hidden email]> wrote:
new Quartz2 plugin released, v2.1.6.2 with your changes (as well as a few others)
Thanks for the pull request

On Jan 24, 2013, at 10:13 AM, Vitalii Samolovskikh aka Kefir wrote:

I just created pull request.

On 24.01.2013 21:40, Josh (basejump) wrote:
I"m releasing a new version today. If you know where the bug is then please send the fix over

On Jan 24, 2013, at 7:30 AM, Vitalii Samolovskikh wrote:

Hi Sitati,

It's bug in TriggerHelper. You can add issue on github https://github.com/9ci/grails-quartz2/issues?state=open but it will be resolved is incredible. You can resolve it yourself.
Most of developers switched to quartz plugin, but it's unstable too.

On 24.01.2013 18:55, Sitati Kituyi wrote:
Hi all,

I'm using the Quartz2 plugin to trigger a job programatically. The job should run once, X minutes after a certain user action. I'm having trouble getting this to work - the job always triggers immediately instead of at the specified time.

My first approach was to use the .schedule(date, dataMap) helper method:

ReportSmssyncTimeoutJob.schedul
e(sendTime, [connectionId:params.id])

I also tried using a trigger:

def trigger = TriggerHelper.simpleTrigger(new JobKey("test"), sendTime, 0, 1, [connectionId:params.id])
ReportSmssyncTimeoutJob.schedule(trigger)

In both cases, the job triggers immediately instead of at sendTime. I've tried doing this with the original quartz plugin, and the first approach works as expected, but I'm working on a project with many jobs set up for the quartz2 plugin so switching plugins is probably not an option. All of these use CronTriggers or are triggered immediately - this is the first time we've had to set up a delay before triggering a dynamically invoked job.

I've also asked on StackOverflow, but haven't had any luck with that.

Thanks,

Sitati

--
Sitati Kituyi







--
Sitati Kituyi