<p>I have a backup job running, scheduled to run every 24 hours. I have the concurrency policy set to &quot;Forbid.&quot; I am testing my backup, and I create jobs manually for testing, but these tests are not forbidding concurrent runs. I use:</p>
<pre><code>kubectl create job --from=cronjob/my-backup manual-backup-(timestamp)
</code></pre>
<p>... and when I run them twice in close succession, I find that both begin the work.</p>
<p>Does the concurrency policy only apply to jobs created by the Cron job scheduler? Does it ignore manually-created jobs? If it is ignoring those, are there other ways to manually run the job such that the Cron job scheduler knows they are there?</p>

macetw
<p><code>...Does the concurrency policy only apply to jobs created by the Cron job scheduler?</code></p>
<p><code>concurrencyPolicy</code> applies to <code>CronJob</code> as it influences how <code>CronJob</code> start job. It is part of <code>CronJob</code> spec and not the <code>Job</code> spec.</p>
<p><code>...Does it ignore manually-created jobs?</code></p>
<p>Yes.</p>
<p><code>...ways to manually run the job such that the Cron job scheduler knows they are there?</code></p>
<p>Beware that when <code>concurrencyPolicy</code> is set to <code>Forbid</code> and when the time has come for CronJob to run job; but it detected there is job belongs to this <code>CronJob</code> is running; it will count the current attempt as <strong>missed</strong>. It is better to temporary set the <code>CronJob</code> <code>spec.suspend</code> to true if you manually start a job base out of the <code>CronJob</code> and the execution time will span over the next schedule time.</p>
