简体   繁体   English

由于记录的限制,我是否会在 Kubernetes 中同时运行我的 CronJob

[英]Will I get concurrent runs of my CronJob in Kubernetes due to the documented limitations

According to this page in K8S, "...two jobs might be created...".根据 K8S 中的这个页面,“......可能会创建两个工作......”。

If I set my concurrencyPolicy to "Forbid" - Will I still get optionally concurrent runs due to the scheduler, or will I get concurrent calls to run but be prevented?如果我将concurrencyPolicy设置为“禁止” - 由于调度程序,我是否仍然可以选择并发运行,或者我是否会得到并发调用运行但被阻止?

I also opened an issue in the Docs site: https://github.com/kubernetes/website/issues/18655我还在文档站点打开了一个问题: https : //github.com/kubernetes/website/issues/18655

Setting concurrencyPolicy to "Forbid" will make it so that if, by the time the next scheduled job comes around, the previous job is still running cron will not spin up another job and will count as a missed job.将 concurrencyPolicy 设置为 "Forbid" 将使得如果到下一个预定作业出现时,前一个作业仍在运行 cron 将不会启动另一个作业,并将被视为错过的作业。 Setting it to "Allow" will allow these jobs to run at least once when scheduled.将其设置为“允许”将允许这些作业在计划时至少运行一次。

There is only a chance of two jobs, or no job, being run at one scheduled time as K8S does not fully prevent this.由于 K8S 并不能完全阻止这种情况,因此只有两个作业或没有作业在一个预定时间运行的机会。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM