2

I am using Quartz for schedule the job. At the time of execution sometimes i face some strange issue. first i just explain my use case, we need a job which will trigger at scheduled time and during scheduling we need to reschedule the same job again but with different time. so, sometimes we are facing that the first trigger comes to ACQUIRE state and at the execution time it will goes to ERROR state in QUARTZ table. or sometime it will run successfully but after reschedule the job it will again goes to ERROR state. and sometimes our code run successfully but it will not print the INFO logs in console and sometimes it will print.

NOTE :: I am having same scheduler and configuration my other environment in that environment it will work fine.

so it may be environment specific issue or not? or how to fix this type of wired issue from QUARTZ.

DILIP DHANKECHA
  • 153
  • 1
  • 14

1 Answers1

5

It may be because you are using JDBC JobStore in a clustered environment OR pointing to common JobStore from different nodes/machines. In case you have multiple instances of application running on different nodes/machines in a cluster, but you do not have same jobs in each instance of your application, the trigger will go to error state. Also, the logs will be written only in the node where the job is being executed. This can happen during rescheduling as well if the rescheduling has not been done properly.

>Instance 1 - Has jobs A,B,C
>Instance 2 - Has jobs A,B
>If Instance 1 goes down, the trigger for job C will go to error state.
Xerxis
  • 191
  • 1
  • 9
  • Thank you for your response. But we have only one Instance at a time which will run on our environment. we are create a trigger and reschedule the same job again after it will successfully executed. Is this problem with memory on docker for app? – DILIP DHANKECHA Mar 26 '21 at 05:29
  • We have a docker container with our app and the quartz using in that app only so i don't think we have multiple instance. – DILIP DHANKECHA Mar 26 '21 at 05:31
  • any idea that what we are missing? – DILIP DHANKECHA Mar 26 '21 at 11:13