Skip to Content

Timers

Timers pause execution until a point in time or after a duration. They can appear as intermediate catch events, boundary events, or start events.

Expression formats

Duration

ISO 8601 duration — added to the current time when the timer is created.

ExpressionMeaning
PT5M5 minutes
PT1H30M1 hour 30 minutes
P1D1 day
P1DT2H1 day and 2 hours
<timerEventDefinition> <timeDuration>PT30M</timeDuration> </timerEventDefinition>

Date

Absolute UTC timestamp — fires at a specific moment.

<timerEventDefinition> <timeDate>2030-06-01T09:00:00Z</timeDate> </timerEventDefinition>

Cycle

Repeating interval — fires multiple times.

ISO 8601 repeating interval:

ExpressionMeaning
R3/PT10H3 times, every 10 hours
R/P1DIndefinitely, every day
R1/PT5MOnce after 5 minutes

After each firing the repeat count is decremented (R3R2R1 → done). R without a count repeats indefinitely.

Cron expression (6-field):

0 30 9 * * MON-FRI → 09:30 every weekday 0 0 * * * * → every hour on the hour

Cron expressions are detected by the presence of spaces (ISO 8601 never contains spaces).

Timer intermediate catch event

Pauses execution at the event and resumes when the timer fires.

<intermediateCatchEvent id="delay"> <timerEventDefinition> <timeDuration>PT1H</timeDuration> </timerEventDefinition> </intermediateCatchEvent>

Timer boundary event

Triggers when the attached task has been active for the given duration.

<boundaryEvent id="escalateTimer" attachedToRef="processOrder" cancelActivity="true"> <timerEventDefinition> <timeDuration>PT2H</timeDuration> </timerEventDefinition> </boundaryEvent>

cancelActivity="true" = interrupting (cancels the task). cancelActivity="false" = non-interrupting (task continues, new path forks).

Scheduling internals

When a timer element is activated, the server computes due_at and writes a row to scheduled_timers. A background job polls for due timers and calls back into the engine. For cycle timers, after each firing the server decrements the repeat count; if still active, a new timer row is scheduled.

Last updated on