Cameron Manavian
1 min readMay 29, 2020

--

Hi Zulhilmi

Each CronJob configuration is just a method to trigger a Kubernetes Job, which has documentation here: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/

For your two questions:

1. There are a number of configurations to control total concurrent jobs, and additional steps can be taken via your application code (perhaps with a Lock or a Worker Queue)

2. Each new Job spawned will essentially start from step one, unless there is an external shared state or config such as a Redis or Database id, task, or process node. You can control how many times a job will keep failing before it gives up with a back off limit, but generally things will "recover" and work once all systems are nominal.

Cron jobs can become more powerful if you combine them with a work queue.

--

--

Cameron Manavian
Cameron Manavian

Written by Cameron Manavian

Father, Husband, Engineer, CTO, 15+ yrs of software engineering — cameronmanavian.com

Responses (1)