Questions tagged [kubernetes-cronjob]

301 questions
0
votes
1 answer

Openshift CronJob not starting for specific time schedule

I'm currently trying to create a CronJob in Openshift that starts every day at 3.00 am. Creating the CronJob using a schedule with step values (e. g. "0 */1 * * *") works fine and the Jobs start correctly, however when creating the CronJob with a…
erlDan
  • 131
  • 4
  • 14
0
votes
1 answer

Will the CronJob declared `resources.request` parameters occupy resources when pod is not active?

Will the CronJob declared resources.request parameters occupy resources when the pod is not active?
KIILA
  • 63
  • 1
  • 4
0
votes
0 answers

ElasticSearch CronJob weird behaviour

I've implemented an example of ELK stack to centralize logging of my k8s cluster using minikube. I've also deployed a cron job to delete 1 day old logs every hour as title of example. Because it's scheduled at the beginning of each hour (schedule:…
0
votes
1 answer

How to terminate docker container with dotnet core application

I have a dotnet Core 3.1 app with the following Host created in Program.cs public static async Task Main(string[] args) { var configuration = ConfigurationFactory.CreateConfiguration(); var appName =…
Kreso Jurisic
  • 100
  • 2
  • 9
0
votes
1 answer

Cron Job In Custom Plugin Not Working In Wordpress

I have added this cronjob in my WordPress custom plugin but when I run the function manually it is working but through cronjob, it is not working. Here is my code! All the plugin files are loaded correctly not showing any error. Can anybody help me…
0
votes
1 answer

Invalid type for io.k8s.api.core.v1.ConfigMapEnvSource got "array" expected "map"

I've a kubernetes cronjob manifest file.In that file I've defined enviornment variables.I'm generating yaml using a shell script but while using the yaml using kubectl create -f. I'm getting the following validation error error validating…
pikubhai
  • 7
  • 1
  • 4
0
votes
1 answer

Docker image only work on my machine, but not on AKS

I am new to Kubernetes. So I have this .NET Core console application Docker image that I built: FROM mcr.microsoft.com/dotnet/core/runtime:3.0-buster-slim AS base WORKDIR /app FROM mcr.microsoft.com/dotnet/core/sdk:3.0-buster AS build WORKDIR…
0
votes
1 answer

How to control interval between kubernetes cronjobs (i.e. cooldown period after completion)

If I set up a kubernetes cronjob with for example spec: schedule: "*/5 * * * *" concurrencyPolicy: Forbid then it will create a job every 5 minutes. However if the job takes e.g. 4 minutes, then it will create another job 1 minute after the…
David S.
  • 5,965
  • 2
  • 40
  • 77
0
votes
2 answers

Kubernetes cron job running 1 minutes earlier

I have kubernetes cluster which has installed on "EST" time zone, if i see the job describe which say ran at "Sun, 02 Feb 2020 19:01:09 -0500" and my cron expression says schedule: "1 0 * * *" " ie every day at 12:01 minutes and i see below Job…
0
votes
0 answers

K8S - Use "Last Schedule" of a CronJob as a parameters in container command

I created a Cronjob that is scheduled for every morning, from Monday to Friday. schedule: "30 7 * * 1-5" The job synchronize a database with a datawarehouse. As I do not want to sync all the database everyday, I want to be able to give two…
Maloz
  • 165
  • 1
  • 2
  • 17
0
votes
1 answer

cronjob kubernetes expected behaviour with a application and a cloud proxy container

I am trying to setup a cron job on my cluster and I have a cloudsql proxy and my application container running in the pod, the cron job works fine, but when i execute kubectl get pods --watch, I see that in my cronjob pod, the ready column says 1/2,…
opensource-developer
  • 2,826
  • 4
  • 38
  • 88
0
votes
0 answers

Run kubectl cronjob reusing a deployment template

I have a pod with 2 containers: a django webserver, and a cloud sql proxy. I want to run a cronjob every day (some django manage.py command). Ideally, I'd like a new container to be created in one of my running pods, by copying the webserver already…
0
votes
1 answer

create resource (cronjob) boilerplate with `kubectl`

I'm on my way to learn k8s, and I'd love to know how we can create boilerplate for cronjob. I know it used to be follwoing. kubectl run mycron --schedule "1 * * * *" --image nginx -o yaml --dry-run. Even it still outputs the boilerplate but it says…
Toshi
  • 6,012
  • 8
  • 35
  • 58
0
votes
1 answer

Creating Cron job in OpenShift online results in: admission webhook "validate.cron.create" denied the request: Prohibited resource for this cluster

I'm learning Openshift Online, I tried to create a cron job from either UI or CLI, both resulted in the below error: Error from server: admission webhook "validate.cron.create" denied the request: Prohibited resource for this cluster. I checked…
talkhouon
  • 21
  • 5
0
votes
1 answer

Is there a way to know at which time pod should be executed?

Supose I have cronjob in Kubernetes that is scheduled each 30 minutes (10:00, 10:30, 11:00 etc.) Supose also that due to resources job started at 10:05 instead of 10:00 or even 11:00 instead of 10:00 Is there an enviroment variable/option to know…
maque
  • 676
  • 1
  • 6
  • 11