As I posted before here I am using Quartz scheduler to schedule some batch jobs. It seemed to work fine but now while we were testing our application it appeared Quartz was showing some weird behaviour. I have scheduled 3 jobs, each with it's own trigger in one scheduler. However, 2 of the jobs are only triggered if the trigger of other remaining job has been fired before.
Of course I checked my configuration multiple times but I couldn't find something wrong with it. After lots of testing and debugging I solved the issue by replacing the rescheduleJob() command with a simple deleteJob() and scheduleJob().

Here is the relevant original piece of code:

JAVA:
  1. if (job == null) {
  2.     nextRun = scheduler.scheduleJob(trigger.getJobDetail(), trigger);
  3. } else {
  4.     nextRun = scheduler.rescheduleJob(trigger.getFullName(), trigger.getGroup(), trigger);
  5. }

After replacing this code with the next piece it worked fine again, although I cannot explain why....

JAVA:
  1. if (job == null) {
  2.     nextRun = scheduler.scheduleJob(trigger.getJobDetail(), trigger);
  3. } else {
  4.     scheduler.deleteJob(trigger.getJobDetail().getName(), trigger.getJobDetail().getGroup());
  5.     nextRun = scheduler.scheduleJob(trigger.getJobDetail(), trigger);
  6. }