Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Nomad periodic job starts immediately

I have a nomad periodic job that has this in the job config:

periodic {
  cron = "* */2 * * *"
  prohibit_overlap = true
}

However, I find that when nomad finishes running the job (the job takes less than two hours), it more or less immediately starts it again (sometimes within 60 seconds). I expected it to start it after about two hours.

Why does that happen, and how can I make nomad start the job only every two hours?

like image 338
Croad Langshan Avatar asked Dec 04 '25 08:12

Croad Langshan


1 Answers

You have * in minutes field, so your job will start every minute. You should change cron to 0 */2 * * *.

like image 198
Mateusz Jaszewski Avatar answered Dec 07 '25 17:12

Mateusz Jaszewski



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!