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
614 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,360 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,360 points
2,796 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,050 points
10,228 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,360 points
2,938 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,061 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
14,639 views
+4 votes
1 answer

Installing Web UI (Dashboard):kubernetes-dashboard on main Ubuntu 16.04.6 LTS (Xenial Xerus) server

Follow these steps: $ kubeadm reset $ kubeadm init ...READ MORE

answered Apr 12, 2019 in Kubernetes by Kalgi
• 52,360 points

reshown Apr 12, 2019 by Kalgi 6,133 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,360 points
8,529 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