Run a cron job once in N hours

+1 vote
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,220 points
852 views

1 answer to this question.

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
• 52,350 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
• 52,350 points
3,115 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
• 7,060 points
10,768 views
0 votes
1 answer

"no such file or directory" error while executing yaml file as a cron job

When you get errors like these, you ...READ MORE

answered Sep 18, 2018 in Kubernetes by Kalgi
• 52,350 points
3,369 views
+1 vote
4 answers

Execute shell script file using kubernetes as a cron job

use /bin/sh instead of /bin/bash This solved it ...READ MORE

answered May 7, 2019 in Kubernetes by Sid
17,725 views
+1 vote
1 answer
0 votes
3 answers

Error while joining cluster with node

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

answered Jan 17, 2019 in Others by anonymous
15,477 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,035 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
• 52,350 points
8,998 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP