Questions tagged [kubernetes-cronjob]
301 questions
0
votes
0 answers
K8S Jobs are being created although backoffLimit
EKS 1.24
A VERY strange situation is occurring with jobs.
Although I set backoffLimit: 0 and restartPolicy: never sometimes after a pod is failed, a new one is created.
According to the docs, a new pod shouldn't be created with my configuration.

jrz
- 1,213
- 4
- 20
- 54
0
votes
0 answers
kubernetes cron runs when node pools are scaled
I have created kubernetes cron job to perform a scheduled task and it runs periodically at the scheduled time. But it also runs when the node pools are scaled up.
Node pools are scaled down one by one everyday night and scaled up in the morning.…

Nivetha
- 1
- 2
0
votes
2 answers
Kubernetes CronJob - Escaping a cURL command with nested JSON and command substitution
I have the following Kubernets CronJob definition:
apiVersion: batch/v1
kind: CronJob
metadata:
name: myCronJob
spec:
schedule: "*/1 * * * *"
failedJobsHistoryLimit: 1
successfulJobsHistoryLimit: 1
jobTemplate:
spec:
…

leifericf
- 2,324
- 3
- 26
- 37
0
votes
0 answers
k8 cronjob docker/curlimages POST appends the headers to the Accept one
I have a cronjob that sends a POST request with a simple body:
apiVersion: batch/v1
kind: CronJob
metadata:
name: test-cron-job
spec:
schedule: "* * * * *"
startingDeadlineSeconds: 15
concurrencyPolicy: Forbid
jobTemplate:
spec:
…

Alexandru Antochi
- 1,295
- 3
- 18
- 42
0
votes
0 answers
Terminate pod with reason Failed instead of Error
I am currently struggling with pods which were spawned from a cronjob. I have a cronjob which spawns a pod every minute and runs a kotlin application. I am using exitProcess(1) inside the application to return the exit code 1 to the pod upon…

Nigel-Lee
- 145
- 1
- 13
0
votes
0 answers
How to pass environment variable in Http Executor in DKRON
I am creating a job that will execute POST api but it need environment vairables does anyone know how to do that in Dkron??

Shivangi Varshney
- 21
- 3
0
votes
0 answers
Django Crontab keeps add "No module named 'django.utils.importlib'"
Every time I try to run python manage.py crontab add or run my testing script I get this:
python manage.py crontab add
Traceback (most recent call last):
File "manage.py", line 22, in
main()
File "manage.py", line 18, in main
…

Anik Saha
- 97
- 6
0
votes
3 answers
Unable to run cron job in kubernets
I have this cron job running on kubernetes:
# cronjob.yaml
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: loadjob
spec:
schedule: "05 10 31 Mar *"
successfulJobsHistoryLimit: 3
jobTemplate:
spec:
template:
…

Niranjan
- 63
- 5
0
votes
0 answers
What is the cron expression for generating two different schedules
I'm looking to run a job:
4pm on the last day of the month
4am and 4pm every day from 1st to 15th every month

james pow
- 336
- 2
- 11
0
votes
1 answer
Does an open-telemetry Metrics instrument need to persist in order to properly record histogram metrics?
Consider the following case:
One has a kubernetes cronjob that runs on a schedule, say once every 30 seconds. This cronjob spins up a new pod, runs a python script that captures some measurements, and records them with the Otel Metrics SDK [ref] to…

Gary Lang
- 1
- 1
0
votes
2 answers
Kubernetes CronJob with spring boot task
I'm running a spring boot task inside a k8s pod. This is the k8s specification:
kind: CronJob
metadata:
name: data-transmission
spec:
schedule: "*/2 * * * *"
concurrencyPolicy: Forbid
successfulJobsHistoryLimit: 1
failedJobsHistoryLimit:…

user2354898
- 253
- 2
- 15
0
votes
1 answer
Cron job periods
I would like to run the cron job every 20 minutes between 9 AM and 11 PM and once an hour after 11 PM until 9 AM.
cron job settings
I created 2 cron jobs for the same script to achieve my goal. Did I do it correctly?
Thank you.

Aziz
- 1
0
votes
1 answer
Trying example Cronjob from Kubnetes with errors
I am trying to use the example cronjob that is explained through Kubernetes documentation here. However, when I check it on Lens (a tool to display Kubernetes info), I receive an error upon creating a pod. The only difference between the Kubernetes…

TheStudentProgrammer
- 43
- 1
- 7
0
votes
0 answers
Kubernetes job spec.parallelism or spec.completions as environment variable
We've got a CronJob that is utilising Indexed Jobs1 for processing orders in parallel based on a modulus, i.e.
// Skip this order if it doesn't match our thread
if ($threaded && ($d['id'] % $mod) != $cnt) continue;
where:
$mod is the…

iamacarpet
- 417
- 5
- 13
0
votes
0 answers
What is the correct way of mounting appsettings file for .Net Core Worker Service?
I have a .Net Worker service that runs as a K8S Cronjob but when it starts up it is failing to mount the appsettings file. The pod remains stuck in CrashLoopBackoff error state and the logs have the following :
Error: failed to create containerd…

Golide
- 835
- 3
- 13
- 36