Recommendation needed for running cron in replicated services

9/29/2021

If let's say my service is running cron jobs. But the service replica is set to 2 in the Kubernetes, this will cause the cron job to run twice at each schedule. Is there any design recommendation to prevent this? Should we only have 1 replicas for a cron job running services or is there any other way?

-- Mohamad Arafat
cron
kubernetes

0 Answers