Change the schedule of Kubernetes cron job

0 votes
I have a cron job in my kubernetes which is scheduled to fetch data every month. I want to reschedule this job, so that it fetches the data every week.

Is therea way to do the same?
Sep 18, 2018 in Kubernetes by lina
• 8,100 points
191 views

2 answers to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

If you're looking for a one line command, you can use this command:

kubectl patch my-cronjob -p '{"spec":{"schedule": "42 11 * * *"}}
answered Sep 18, 2018 by Kalgi
• 36,420 points
0 votes

Hey @Lina, You can use the keyword patch to update only the selected fields of resource.

$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.

answered Sep 18, 2018 by Hannah
• 14,080 points

Related Questions In Kubernetes

0 votes
1 answer

Increasing the shm size of a kubernetes container

You cannot achieve this in kubernetes pod. ...READ MORE

answered Sep 12, 2018 in Kubernetes by ajs3033
• 7,080 points
431 views
0 votes
1 answer

Kubernetes cron job call curl in loop

It's a small silly mistake: dollar sign $ should be ...READ MORE

answered Sep 17, 2018 in Kubernetes by Kalgi
• 36,420 points
651 views
0 votes
1 answer

How to fail a (cron) job after a certain number of retries?

You're trying to set 3 asbackoffLimit of your Job. ...READ MORE

answered Sep 17, 2018 in Kubernetes by Kalgi
• 36,420 points
63 views
+1 vote
4 answers
0 votes
1 answer
0 votes
3 answers

Error while joining cluster with node

Hi Kalgi after following above steps it ...READ MORE

answered Jan 17 in Others by anonymous
744 views
+3 votes
1 answer
0 votes
1 answer

Spark job using kubernetes instead of yarn

I should be in the format of ...READ MORE

answered Sep 6, 2018 in Kubernetes by Kalgi
• 36,420 points
83 views
0 votes
1 answer

Connect to existing pod, execute script, disconnect - Kubernetes cron job

As far as i know there's no ...READ MORE

answered Sep 17, 2018 in Kubernetes by Kalgi
• 36,420 points
396 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.