Run a cron job once in N hours

0 votes
Kubernetes cron job has a feature where it can run a job a specified time.

I'm trying to have something where you can run a job every N hours. But i can't find any example or documentation to do so.

How do I go about this?
Sep 18, 2018 in Kubernetes by lina
• 8,100 points
19 views

1 answer 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 want your cron job to run every hour then you can do something like this:

You have to edit the crontab file, like:

crontab -e

There you add

0 13,14,15 *   *   *     /home/user/command

to execute your command at 13:00, 14:00 and 15:00. Also note that user has to be substituted with the user account the command is executed in.

answered Sep 18, 2018 by Kalgi
• 35,720 points

Related Questions In Kubernetes

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
• 35,720 points
54 views
0 votes
2 answers

Is there a way to start a cron job manually

You can create a simple job based ...READ MORE

answered Sep 18, 2018 in Kubernetes by Nilesh
• 6,900 points
187 views
0 votes
1 answer
+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
443 views
+3 votes
1 answer
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
• 35,720 points
550 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.