Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

214
Vistas
How to make cron job start after x seconds?

I think I am misunderstanding Kubernetes CronJobs. On the CKAD exam there was a question to have a CronJob run every minute, but it should start after an arbitrary amount of time. I don't see any properties for CronJobs or Jobs to have them start after a specific time. Should that be part of the cron string or am I completely misunderstanding?

over 4 years ago · Santiago Trujillo
3 Respuestas
Responde la pregunta

0

You can schedule your CronJob to start at specific date/time and than run every minute or however you would like to set it. There is a powerful online tool that can help you with it. For example:

0 0/10 10/1 ? * * *

will schedule your CronJob to run every 10 mins starting at 10h of the day. Or:

0 0/10 * ? * 6/1 *

will schedule your CronJob to run every 10 mins starting on Friday.

The important thing to keep in mind while using this particular approach is to be aware of the timezone that your cluster is running in:

All CronJob schedule: times are based on the timezone of the kube-controller-manager.

If your control plane runs the kube-controller-manager in Pods or bare containers, the timezone set for the kube-controller-manager container determines the timezone that the cron job controller uses.

More info/examples about scheduling can be found below:

  • Cron schedule syntax

  • Running Automated Tasks with a CronJob

over 4 years ago · Santiago Trujillo Denunciar

0

maybe you misunderstood the question, it was to terminate the job if it didn't complete in x seconds. you should use the .spec.activeDeadlineSeconds to satisfy the requirment.

over 4 years ago · Santiago Trujillo Denunciar

0

you could do

sleep "seconds"; echo " * * * * * command" >> path/to/crontab

I feel like maybe the question is worded incorrectly. It probably meant something like every minute on every Saturday day.

 * * * * SAT

Or every minute through range of hours

* 9-17 * * *

https://crontab.guru/examples.html

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda