3

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?

Croad Langshan
  • 2,646
  • 3
  • 24
  • 37

1 Answers1

3

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