Closed pabrahamusa closed 3 years ago
You can do exactly the same with tzcronjobs. Just specify tzcronjobs instead of cronjobs.
@Luis-TT it is not working , I tried following and getting error.
$> kubectl patch tzcronjob cronjob-runnightlyjobs -p '{"spec" : {"suspend" : true }}'
Error from server (UnsupportedMediaType): the body of the request was in an unknown format - accepted media types include: application/json-patch+json, application/merge-patch+json, application/apply-patch+yaml
kubectl patch
defaults to strategic, which is not supported for Custom Resource types, you need to use a --type=merge
strategy.
During maintenance purpose I want to disable all CronJobs, For default Kubernetes CronJob we can execute following command
However I cannot see an option to do this in CronJobber . Is there a way to disable and enable Cronjob without playing with schedules.