Search code examples
kubernetesquarkus

Quarkus scheduler in multiple pods (other than concurrentExecution = SKIP)


In Quarkus framework how to schedule a job to execute only in one pod rather running in all pods. I tried (concurrentExecution = SKIP) that didn't help.

Run the job only in one pod on multi instant application.


Solution

  • From Quarkus guide: https://quarkus.io/guides/scheduler-reference#concurrent_execution

    Note that only executions within the same application instance are considered. This feature is not intended to work across the cluster

    so I suppose you have to move to Quartz to get cluster support out-of-the-box or create your custom synchronization method (eg. using a database or file,etc).