I have a QuartzJobBean running with Springboot 3.0, Java 17 and Quartz 2.3.2. I am using simple one-time triggers.
My problem is that sometimes the job seems to be ignored even if the trigger is fired. Looking at the database I see the trigger going thru "waiting", "acquired", then removed. I set org.quartz logging to debug and implemented all sort of listeners. There are no errors, all I can see is that when the time is up the trigger is acquired then goes away. I tried debugging but it just doesn't enter the job executeInternal(). It doesn't happen every time, but I have been unable to isolate a pattern. Can you give me some hint on where more to look at to identify the issue?
Comment From: wilkinsona
If executeInternal() isn't called and there are no errors, Quartz must not be calling QuartzJobBean.execute(JobExecutionContext). That call should be made by JobRunShell so I would try debugging its run method to see why execute is not being called. The database should also contain information about the trigger's state following the attempted execution of the job.
Beyond this, I don't think there's anything we can do to help as neither Spring Framework nor Spring Boot is really involved. Once everything's set up it's down to Quartz to manage the triggers and execute the jobs when appropriate. You may want to ask on Stack Overflow or follow up with the Quartz community.
Comment From: algernon28
Ok, I was thinking something related to the dependency injection in the job (I use constructor DI), but that doesn't seem to be the case. Will debug JobRunShell, thanks for the hint.
On Wed, 7 Jun 2023, 11:00 Andy Wilkinson, @.***> wrote:
If execute internal() isn't called and there are no errors, Quartz must not be calling QuartzJobBean.execute(JobExecutionContext). That call should be made by JobRunShell so I would try debugging its run method to see why execute is not being called. The database should also contain information about the trigger's state following the attempted execution of the job.
Beyond this, I don't think there's anything we can do to help as neither Spring Framework nor Spring Boot is really involved. Once everything's set up it's down to Quartz to manage the triggers and execute the jobs when appropriate. You may want to ask on Stack Overflow or follow up with the Quartz community.
— Reply to this email directly, view it on GitHub https://github.com/spring-projects/spring-boot/issues/35770#issuecomment-1580242166, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACXFO4QYEWK7SMK3EIL4LZDXKA7JJANCNFSM6AAAAAAY5PJ3DQ . You are receiving this because you authored the thread.Message ID: @.***>