Questions tagged [kubernetes-cronjob]

301 questions
0
votes
0 answers

There a way to schedule a script to automatically unzip a .zip file which overwrites all existing files?

I'm a bit of a newbie, but is there a way to schedule a script to automatically unzip a .zip file which overwrites all existing files?I've been reading and some people suggesting writing a .php script then having Cron to schedule it.If anyone can…
sojib
  • 3
  • 1
0
votes
0 answers

Intermittent org.apache.spark.SparkException: Could not find spark-version-info.properties in K8s

My application uses K8s cronjob to schedule the application run, consequently creating a pod for each occurrence. In most of the cases, the application runs well, but in some of them, it fails with the following error: …
Julia Bel
  • 337
  • 4
  • 18
0
votes
1 answer

Kubernetes CronJobs - not start at the top of the minute

I have a couple (at some point many) k8s cron jobs, each with schedules like */5 * * * * # Every five minutes */1 * * * * # Every minute */1 * * * * */2 * * * * # Every two minutes ... My problem is that k8s seems to start them all at the top of…
silent
  • 14,494
  • 4
  • 46
  • 86
0
votes
1 answer

How to execute a binary and use sleep pod after some time together in kubernetes

I have a use case that my "./main" binary should run inside the pod and stop after some time (90 seconds) before launching a new pod by the cronJob object. But I am not confused about how to add both sleep and run my binary in the background…
Deepak Mourya
  • 340
  • 2
  • 10
0
votes
1 answer

How to create Cron job for every two hours starting from time from 6am to 6pm PST ? Any possibility of excluding weekends?

I have to create a Cron job every two hours, starting from time 6 am PST to 6 pm PST. Also any possibility of excluding weekends? It will be used in databricks.
Thiru Balaji G
  • 163
  • 2
  • 10
0
votes
1 answer

unable to execute a bash script in k8s cronjob pod's container

Team, /bin/bash: line 5: ./repo/clone.sh: No such file or directory cannot run above file but I can cat it well. I tried my best and still trying to find but no luck so far.. my requirement is to mount bash script from config map to a directory…
AhmFM
  • 1,552
  • 3
  • 23
  • 53
0
votes
2 answers

How to stop/terminate Argo cron workflow?

In our requirement we need to connect to ARGO instance and take necessary actions on the jobs. So we are consuming ARGO java apis to connect to argo instance and performing the actions like suspend,resume,retry.... But i am not able to find apis for…
0
votes
2 answers

Kubernetes - Handle cronjobs like crontab

I have a lot of cronjobs I need to set on Kubernetes. I want a file to manage them all and set them to Kubernetes on deployment. I wish that if I remove a cron from that file it will be removed from Kubernetes too. Basically, I want to handle the…
idan ahal
  • 707
  • 8
  • 21
0
votes
1 answer

Kubernetes Cronjob. Upgrade Schedule with helm command. Set does not accept * as first character

I have a cronjob running in an aks. Its rollout with an helm chart: apiVersion: batch/v1 kind: CronJob metadata: name: {{ include "gdp-chart.fullname" . }}-importjob labels: {{- include "gdp-chart.labels" . | nindent 4 }} spec: suspend: {{…
DaveVentura
  • 612
  • 5
  • 19
0
votes
1 answer

Kubernetes livenessProbe some container stops with failure and others in success. What is the cause?

Deep dive to this question. I have a scheduled cron job and a never ending container in the same pod. To end the never ending container when the cron job has done it's work I'm using a liveness probe. apiVersion: batch/v1 kind: CronJob metadata: …
Pp88
  • 830
  • 6
  • 19
0
votes
1 answer

Mark succesfull a pod with a cron job container and a never ending container when the cron job ends

I have a pod with a cron job container and a never ending container. is there a way to mark the pod as successfull when the cron job ends? The problem is that with the never ending container in the same pod of the cron job the pod remains always in…
Pp88
  • 830
  • 6
  • 19
0
votes
0 answers

Fetch response json from curl API request in k8s cron job

I am trying to use a k8s cron job to schedule API calls to a service. I am new to k8s cron jobs. The service requires an Auth token in the request header for authorization. That auth token can be retrieved from Token service(another service) call.…
Biswarup Nath
  • 196
  • 1
  • 7
0
votes
0 answers

Avoiding stale data when two cron jobs access the same DB

I have two tables(let's say Table A and B) to store the status of two independent activity respectively. I have two cron jobs(Lets call it A and B again) which run 15 mins apart, every 30 mins. They both have the same logic, Updating the data in the…
0
votes
1 answer

I want to restart my kubernates pods after every 21 days

I want to restart my Kubernetes pods after every 21 days I want probably a crone job that can do that. That pod should be able to restart pods from all of my deployments. I don't want to write any extra script for that is that possible ? Thanks you…
Rohit W
  • 45
  • 7
0
votes
0 answers

Run kubectl command after CronJob is scheduled but before it runs

I have multiple CronJobs scheduled to run on some days. I deploy them with Helm charts, and I need to test them - therefore, I'm looking for a solution to run cronjob once right after it gets deployed with Helm. I have already tried using Helm…