Issue Details (XML | Word | Printable)

Key: QUARTZ-688
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Blocker Blocker
Assignee: James House
Reporter: Maciej Andrzej Świętochowski
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Quartz Scheduler

CronTrigger not executes StatefulJob as expected

Created: 20/Aug/08 04:49 AM   Updated: 07/Oct/08 04:57 AM
Component/s: Triggers
Affects Version/s: 1.6.1
Fix Version/s: 1.6.1

Environment: Linux 2.6.24-19-generic (ubuntu), sun's JDK 1.6.0_07, Quartz 1.6.1-RC1
Issue Links:
Container
 

Flags: Important


 Description  « Hide
Fully described: http://forums.opensymphony.com/thread.jspa?threadID=421166&tstart=0

Summary:
I have set up 3 jobs and 3 CronTriggers (one trigger for each job), and it does not execute as expected. In my post I attached files that help you reproduce this issue. Two jobs are scheduled to run each 30 seconds and one job each 10 seconds. After few (one, simetimes two) execution od 30-jobs, the 10-job doesn't execute as expected. In my opinion it is critical issue. I have tested it against 1.5.2 and 1.6.0 - they're not affected. Tested on JDBC jobstore and RAM jobstore. See the attached code and watch the console output.

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
James House added a comment - 20/Aug/08 08:53 AM

Hi Maciej,

Can you download the (very new!) 1.6.1RC2 build and see if you can replicate this problem? If so, I'll look into it right away.

Download RC2 here:
https://quartz.dev.java.net/files/documents/1267/108143/quartz-1.6.1-RC2.zip


thanks!

Maciej Andrzej Świętochowski added a comment - 20/Aug/08 01:47 PM
Hi James,

unfortunately RC2 is also affected. I haven't done so extensive testing as with RC1, but it appears that it's even worse with RC2. Some examples:

1.6.0 - proper output:
20:36:38.253 INFO [main] org.quartz.core.QuartzScheduler.start:455 - Scheduler Scheduler_$_NON_CLUSTERED started.
Executing... Wed Aug 20 20:36:40 CEST 2008
Executing... Wed Aug 20 20:36:50 CEST 2008
Executing... Wed Aug 20 20:37:00 CEST 2008
Executing... Wed Aug 20 20:37:00 CEST 2008
Executing... Wed Aug 20 20:37:00 CEST 2008
Executing... Wed Aug 20 20:37:10 CEST 2008
Executing... Wed Aug 20 20:37:20 CEST 2008
Executing... Wed Aug 20 20:37:30 CEST 2008
Executing... Wed Aug 20 20:37:30 CEST 2008
Executing... Wed Aug 20 20:37:30 CEST 2008
Executing... Wed Aug 20 20:37:40 CEST 2008

1.6.1-RC1, wrong output:
20:38:14.099 INFO [main] org.quartz.core.QuartzScheduler.start:460 - Scheduler Scheduler_$_NON_CLUSTERED started.
Executing... Wed Aug 20 20:38:20 CEST 2008
Executing... Wed Aug 20 20:38:30 CEST 2008
Executing... Wed Aug 20 20:38:30 CEST 2008
Executing... Wed Aug 20 20:38:30 CEST 2008
Executing... Wed Aug 20 20:38:40 CEST 2008 <- OK to this moment, but no 10,20,40,50s executions after this
Executing... Wed Aug 20 20:39:00 CEST 2008
Executing... Wed Aug 20 20:39:00 CEST 2008
Executing... Wed Aug 20 20:39:00 CEST 2008

1.6.1-RC2, wrong output:
20:41:32.516 INFO [main] org.quartz.core.QuartzScheduler.start:460 - Scheduler Scheduler_$_NON_CLUSTERED started.
Executing... Wed Aug 20 20:41:40 CEST 2008
Executing... Wed Aug 20 20:41:40 CEST 2008
Executing... Wed Aug 20 20:41:40 CEST 2008
Executing... Wed Aug 20 20:41:40 CEST 2008
Executing... Wed Aug 20 20:41:40 CEST 2008
Executing... Wed Aug 20 20:42:10 CEST 2008
Executing... Wed Aug 20 20:42:10 CEST 2008
Executing... Wed Aug 20 20:42:10 CEST 2008
Executing... Wed Aug 20 20:42:10 CEST 2008
Executing... Wed Aug 20 20:42:10 CEST 2008
Executing... Wed Aug 20 20:42:40 CEST 2008
Executing... Wed Aug 20 20:42:40 CEST 2008
Executing... Wed Aug 20 20:42:40 CEST 2008
Executing... Wed Aug 20 20:42:40 CEST 2008
Executing... Wed Aug 20 20:42:40 CEST 2008

The source code is as simple as possible, yet still useful and replicating the problem. When using only 2 jobs (on 10-job and one 30-job) with RC2 it also goes wrong. The number of proper executions in RC1 is different, depending on when the scheduler will start (and thus the order of executing first few jobs).

Looking forward to hearing from you.

James House added a comment - 20/Aug/08 02:03 PM

OK, thanks for the feedback (even if it is disappointing).

It's odd that I haven't turned this up in my own testing, nor has anyone else reported it (RC1 was downloaded approx 15K times).

I'll try to take some time this evening to attempt reproducing it with the code you posted.

James House added a comment - 20/Aug/08 03:09 PM

Well, the good(?) news is that I can replicate it with your simple program.

Strange that I can't in a more complex test. I'll start debugging this immediately.


James House added a comment - 22/Aug/08 11:10 AM

Fixed in RC3 build that will be released this weekend.

jayaraj added a comment - 07/Oct/08 04:36 AM
I have tested it . Still there is an issue in quartz-1.6.1-RC3

please confirm