<p>Kubernetes have cronjob which can be used to schedule jobs periodically <a href="https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/</a></p>
<p>Is there a way to reset cronjob schedule, let's say it's running at <code>0</code>,<code>5</code>,<code>10</code>,<code>15th</code> min of hour at every 5 mins schedule, now if i want to schedule a job manually at <code>17th</code> min, i can trigger one, but i also want now cronjob schedule to reset and next run should be at <code>22th</code> min, instead of <code>20th</code> min.</p>
<p>I have tried deleting and recreating job with same spec, but that doesn't help as well, somehow it ends up restoring schedule meta for the job specs.</p>
<p>Is there a trick to reset cronjob schedule?</p>
<p>Cron job running at every 5 min</p>
<p>0, 5, 10, 15th, 20th</p>
<p>Reset at 17th mins , next cadence should be</p>
<p>0, 5, 10, 15th, 17th, 22th</p>

Shahzad
<p>Automatically no ( actually maybe with a script that modify your cronjob manifest but I think that's ugly but do whatever you want)</p>
<p>However, if you want to modify it after every manual job execution (for example at min 17) go modify your cronjob like this for example:</p>
<pre><code>2-57/5 * * * * 
</code></pre>
<p>This way if you ran it manually a minute 17, the next will be 22,27 etc..</p>
<p>If another day you ran it manually at minute 24 for example do this:</p>
<pre><code>4-59/5 * * * * 
</code></pre>
<p>Etc...</p>
