<p><strong>Is there a simple way to change the schedule of a kubernetes cronjob</strong> like <code>kubectl change cronjob my-cronjob "10 10 * * *"</code>? Or any other way without needing to do <code>kubectl apply -f deployment.yml</code>? The latter can be extremely cumbersome in a complex CI/CD setting because manually editing the deployment yaml is often not desired, especially not if the file is created from a template in the build process.</p>

<p><strong>Alternatively, is there a way to start a cronjob manually?</strong> For instance, a job is scheduled to start in 22 hours, but I want to trigger it manually once now without changing the cron schedule for good (for testing or an initial run)?</p>

<p>You can update only the selected field of resourse by patching it</p>

<pre><code>patch -h                     
Update field(s) of a resource using strategic merge patch, a JSON merge patch, or a JSON patch.           

JSON and YAML formats are accepted.

Please refer to the models in
https://htmlpreview.github.io/?https://github.com/kubernetes/kubernetes/blob/HEAD/docs/api-reference/v1/definitions.html
to find if a field is mutable.
</code></pre>

<p>As provided in comment for ref :</p>

<pre><code>kubectl patch cronjob my-cronjob -p '{"spec":{"schedule": "42 11 * * *"}}'
</code></pre>

<p>Also, in current kubectl versions, to launch a onetime execution of a declared cronjob, you can manualy create a job that adheres to the cronjob spec with</p>

<pre><code>kubectl create job --from=cronjob/mycron
</code></pre>
