<p>How can I schedule a Kubernetes <a href="https://kubernetes.io/docs/tasks/job/automated-tasks-with-cron-jobs/" rel="nofollow noreferrer">cron job</a> to run at a specific time and just once?</p>
<p>(Or alternatively, a Kubernetes job which is not scheduled to run right away, but delayed for some amount of time – what is in some scheduling systems referred to as &quot;earliest time to run&quot;.)</p>
<p>The documentation says:</p>
<blockquote>
<p>Cron jobs can also schedule individual tasks for a specific time [...]</p>
</blockquote>
<p>But how does that work in terms of job history; is the control plane smart enough to know that the scheduling is for a specific time and won't be recurring?</p>

<p>You can always put specific minute, hour, day, month in the schedule cron expression, for example 12:15am on 25th of December:</p>
<pre><code>apiVersion: batch/v1
kind: CronJob
metadata:
  name: hello
spec:
  schedule: &quot;15 0 25 12 *&quot;
  jobTemplate:
    spec:
      template:
        spec:
          containers:
          - name: hello
            image: busybox
            imagePullPolicy: IfNotPresent
            command:
            - /bin/sh
            - -c
            - date; echo Hello from the Kubernetes cluster
          restartPolicy: OnFailure
</code></pre>
<p>Unfortunately it does not support specifying the year (the single <code>*</code> in the cron expression is for the day of the week) but you have one year to remove the cronjob before the same date &amp; time comes again for the following year.</p>
