title: How to verify a cronjob successfully completed in Kubernetes
body: <p>I am trying to create a cronjob that runs the command <strong>date</strong> in a single busybox container. The command should run every minute and must complete within 17 seconds or be terminated by Kubernetes. The cronjob name and container name should both be hello.</p>
  <pre><code>apiVersion: batch/v1beta1
  kind: CronJob
  metadata:
    name: hello
  spec:
    jobTemplate:
      metadata:
        name: hello
      spec:
        completions: 1
        activeDeadlineSeconds: 17
        template:
          metadata:
            creationTimestamp: null
          spec:
            containers:
            - image: busybox
              name: hello
              command: [&quot;/bin/sh&quot;,&quot;-c&quot;,&quot;date&quot;]
              resources: {}
            restartPolicy: OnFailure
    schedule: '*/1 * * * *'
  status: {}
  </code></pre>
  <p>I want to verify that the job executed successfully at least once.
  I tried it using the command <strong>k get cronjob -w</strong> which gives me this result.</p>
  <p><a href="https://i.stack.imgur.com/cZJp3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cZJp3.png" alt="enter image description here" /></a></p>
  <p>Is there another way to verify that the job executes successfully? Is it a good way to add a command <strong>date</strong> to the container?</p>