Sayak Mukhopadhyay
Sayak Mukhopadhyay

Reputation: 1464

Running a Spring Boot project with Quartz scheduler on Kubernetes

I am working on a Spring Boot project which has a scheduler service using Quartz. This scheduler service runs a specific scheduled or cron job by calling a separate micro-service.

Now I am planning to deploy my micro-services on kubernetes and I want to make sure that my scheduler service is also clustered. I have noticed that Quartz supports clustering using JDBC-JobStore but I am not entirely sure if such a scenario can be deployed using kubernetes. Will it work if I have 3 pods of the Scheduler service managed and scaled using kubernetes?

Upvotes: 8

Views: 6575

Answers (1)

Soroosh Sarabadani
Soroosh Sarabadani

Reputation: 439

Yes as long as you run the quartz in Cluster Mode and set org.quartz.scheduler.instanceId = AUTO it does work.

In case of scaling, just some pods will be added or get removed, Quartz will take care of it since each instance would have its distinct instance ID.

Upvotes: 8

Related Questions