<p>I think I am misunderstanding Kubernetes CronJobs. On the CKAD exam there was a question to have a CronJob run every minute, but it should start after an arbitrary amount of time. I don't see any properties for CronJobs or Jobs to have them start after a specific time. Should that be part of the cron string or am I completely misunderstanding?</p>

humiliatedpenguin
<p>You can schedule your CronJob to start at specific date/time and than run every minute or however you would like to set it. There is a <a href="https://www.freeformatter.com/cron-expression-generator-quartz.html" rel="nofollow noreferrer">powerful online tool</a> that can help you with it. For example:</p>
<pre><code>0 0/10 10/1 ? * * *
</code></pre>
<p>will schedule your CronJob to run every 10 mins starting at 10h of the day. Or:</p>
<pre><code>0 0/10 * ? * 6/1 *
</code></pre>
<p>will schedule your CronJob to run every 10 mins starting on Friday.</p>
<p>The important thing to keep in mind while using this particular approach is to be aware of the timezone that your cluster is running in:</p>
<blockquote>
<p>All CronJob <code>schedule:</code> times are based on the timezone of the
kube-controller-manager.</p>
<p>If your control plane runs the kube-controller-manager in Pods or bare
containers, the timezone set for the kube-controller-manager container
determines the timezone that the cron job controller uses.</p>
</blockquote>
<p>More info/examples about scheduling can be found below:</p>
<ul>
<li><p><a href="https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/#cron-schedule-syntax" rel="nofollow noreferrer">Cron schedule syntax</a></p>
</li>
<li><p><a href="https://kubernetes.io/docs/tasks/job/automated-tasks-with-cron-jobs/" rel="nofollow noreferrer">Running Automated Tasks with a CronJob</a></p>
</li>
</ul>
