<pre><code>
 SCHEDULE    SUSPEND   ACTIVE   LAST SCHEDULE   AGE
hello   * * * * *   False     2        2m42s           5m6s
hello   * * * * *   False   3     6s    5m30s
hello   * * * * *   False   4     6s    6m30s
hello   * * * * *   False   3     46s   7m10s
hello   * * * * *   False   1     56s   7m20s
hello   * * * * *   False   2     6s    7m30s
hello   * * * * *   False   0     26s   7m50s
hello   * * * * *   False   1     7s    8m31s
hello   * * * * *   False   0     16s   8m40s
hello   * * * * *   False   1     7s    9m31s
hello   * * * * *   False   0     17s   9m41s
hello   * * * * *   False   1     7s    10m


</code></pre>

<p>Im runnig K8S cronjob and Im using the following command to watch it</p>

<p><code>kubectl get cronjobs --watch -n ns1</code></p>

<p>when watching the output Im notice that for each min there is two job</p>

<p>e.g. see <code>2m1s</code> and <code>2m11s</code>
and so on …</p>

<p>why ? I want to run it exactly one time in every minute , how can I do that ? </p>

<pre><code>hello   * * * * *   False     0        &lt;none&gt;          4s
hello   * * * * *   False   1     7s    61s
hello   * * * * *   False   0     17s   71s
hello   * * * * *   False   1     7s    2m1s
hello   * * * * *   False   0     17s   2m11s
hello   * * * * *   False   1     7s    3m1s
hello   * * * * *   False   0     17s   3m11s
</code></pre>

<p>This is the docker file</p>

<pre><code>apiVersion: batch/v1beta1
kind: CronJob
metadata:
  name: hello
  namespace: monitoring
spec:
  schedule: "* * * * *" # run every minute
  startingDeadlineSeconds: 10 # if a job hasn't starting in this many seconds, skip
  concurrencyPolicy: Forbid # either allow|forbid|replace
  successfulJobsHistoryLimit: 3 # how many completed jobs should be
  jobTemplate:
    spec:
      template:
        spec:
          containers:
            - name: hello
              image: busybox
              args:
                - /bin/sh
                - -c
                - date; echo Hello from the Kubernetes cluster
          restartPolicy: OnFailure
</code></pre>

<p>I tried also to change the schedule like <code>"*/1 * * * *”</code> which doesnt helps.</p>

<p>update</p>

<p>It seems that for each cronjob there is an entry like this</p>

<pre><code>NAME    SCHEDULE      SUSPEND   ACTIVE   LAST SCHEDULE   AGE
hello             */1 * * * *                 False               1              0s            7s
</code></pre>

<p>and after 10 second I see </p>

<pre><code>hello              */1 * * * *                 False              0              1 0s           17s
</code></pre>

<p>so on... <strong>one active and the second not</strong></p>

Rayn D
<p>I think you are looking at the wrong thing.</p>

<p><a href="https://kubernetes.io/docs/tasks/job/automated-tasks-with-cron-jobs/" rel="noreferrer"><code>CronJob</code></a> is spawning a <code>Job</code>, so you should be looking at job logs:</p>

<pre><code>$ kubectl get jobs
NAME               DESIRED   SUCCESSFUL   AGE
hello-1558019160   1         1            2m
hello-1558019220   1         1            1m
hello-1558019280   1         1            14s
</code></pre>

<p>As you can see there is only <strong>one</strong> spawned per minute.
It's possible that the job will take longer then a minute to complete this is when <a href="https://kubernetes.io/docs/tasks/job/automated-tasks-with-cron-jobs/#concurrency-policy" rel="noreferrer"><code>concurrencyPolicy</code></a> comes to play:</p>

<blockquote>
  <p>The  <code>.spec.concurrencyPolicy</code>  field is also optional. It specifies how to treat concurrent executions of a job that is created by this cron job. The spec may specify only one of the following concurrency policies:</p>
  
  <ul>
  <li><code>Allow</code>  (default): The cron job allows concurrently running jobs</li>
  <li><code>Forbid</code>: The cron job does not allow concurrent runs; if it is time for a new job run and the previous job run hasn’t finished yet, the cron job skips the new job run</li>
  <li><code>Replace</code>: If it is time for a new job run and the previous job run hasn’t finished yet, the cron job replaces the currently running job run with a new job run</li>
  </ul>
  
  <p>Note that concurrency policy only applies to the jobs created by the same cron job. If there are multiple cron jobs, their respective jobs are always allowed to run concurrently.</p>
</blockquote>

<p>You can also do <code>kubectl describe jobs hello-1558019160</code> in which you will see events:</p>

<pre><code>Events:
  Type    Reason            Age   From            Message
  ----    ------            ----  ----            -------
  Normal  SuccessfulCreate  2m    job-controller  Created pod: hello-1558019160-fld74
</code></pre>

<p>I was running your <code>.yaml</code> and did not saw <code>Active</code> jobs being higher then <code>1</code>.</p>

<p>Hope this helps.</p>
