Default number of job executions

Hello,

just a question on the terminology. In the docs, it reads “By default, a failed job will be retried three times”.

Does this mean that a job will be executed four times by default (one as the initial execution and then three times as a retry)?

I.e. if I wand that a step is executed only once I have to set the retry to zero. Right?

Thank you!

@fml2 your understanding is correct. Initial execution + default 3 retries will be executed if that task is failed.

I never tried setting job retry=0 to avoid number of retries. You can try configuring and test it.

If You can configure job retry as zero, then you have to implement a custom FailedJobCommandFactory .

Hrm… My experiments show that a job is executed three times, not four, and then an incident is created. Hence the number of executions is three, but the number of retries is two.

Is this me who does something wrong or does the camunda docs use a not quite precise word?

The number or retries is actually the overall number of a job execution until an incident is created. So the documentation might be a bit misleading here.
If you want to force zero retries you can pass “R0/PT1M” to the “Retry Time Cycle” field in the modeler (it says “retry zero times for a period of time of one minute”). This way an incident will be created right after the first run failed.

1 Like

I’ve created PR#273