A pending delayed firing of an EmailTrigger, created when a trigger with the create-timer action runs and due to fire once its delay has elapsed. The timer records the trigger which created it, the profile and optional website it should fire for, and a snapshot of the five event condition values, so that when it comes due the original event can be replayed through the trigger's matching logic. A background process picks up due timers in batches, stamping processingStartedAt to claim one and completedProcessingAt when it succeeds, and retries a timer up to a maximum number of attempts. Timers whose trigger has been disabled or soft deleted are never picked up, and nor are those belonging to an organisation without a valid licence.

Group: Database Entities

Implements: Serializable


Properties

PropertyReturnsDescription
completedProcessingAtDateWhen the timer was successfully processed. A timer with this set is finished and is never picked up again.
contactRequestContactRequestIf this delay was caused by a contact request, the request data it came from. It is passed to the delayed event as an attribute. Lazily loaded.
createdAtDateWhen this timer was created, which is normally when the originating event occurred. Required.
emailTriggerEmailTriggerThe trigger which created this timer and which is re-fired when it comes due. Required, and lazily loaded.
eventCondition1StringFirst condition value captured from the event which created this timer, replayed when the delayed event is fired so it is matched exactly as the original would have been.
eventCondition2StringSecond condition value captured from the event which created this timer, replayed when the delayed event is fired so it is matched exactly as the original would have been.
eventCondition3StringThird condition value captured from the event which created this timer, replayed when the delayed event is fired so it is matched exactly as the original would have been.
eventCondition4StringFourth condition value captured from the event which created this timer, replayed when the delayed event is fired so it is matched exactly as the original would have been.
eventCondition5StringFifth condition value captured from the event which created this timer, replayed when the delayed event is fired so it is matched exactly as the original would have been.
fireAtDateThe date and time this timer becomes due. In practice it will not fire at exactly this time, but some time afterwards, when the background process next picks up due timers. Required.
fireForProfileProfileThe profile the re-fired event applies to, which becomes the source profile of the delayed event. Optional and lazily loaded.
idlongDatabase identifier for this timer.
manuallyFiredBooleanMarks a timer that was fired on demand rather than by the scheduled process which picks up due timers. It is set by whatever fired it; null means it was not.
notesStringFree text description, up to 2048 characters, of what created this timer, recorded for auditing.
numAttemptsintHow many times processing of this timer has been started. Incremented each time the timer is claimed, so a timer that keeps failing eventually reaches the maximum attempts and is left alone.
processingStartedAtDateWhen a process last claimed this timer. It is set and committed immediately on claiming, which keeps other processes off the timer until the configured timeout has passed.
websiteWebsiteThe website the originating event applied to, carried through so the delayed event is evaluated in the same site context. Optional and lazily loaded.

Methods

getId() · getEmailTrigger() · getNumAttempts() · getCreatedAt() · getFireAt() · getProcessingStartedAt() · getCompletedProcessingAt() · getFireForProfile() · getWebsite() · getNotes() · getContactRequest() · getEventCondition1() · getEventCondition2() · getEventCondition3() · getEventCondition4() · getEventCondition5() · getManuallyFired() · manuallyFired()

getId()

Returns: long

Database identifier for this timer.

getEmailTrigger()

Returns: EmailTrigger

The trigger which created this timer and which is re-fired when it comes due. Required, and lazily loaded.

getNumAttempts()

Returns: int

How many times processing of this timer has been started. Incremented each time the timer is claimed, so a timer that keeps failing eventually reaches the maximum attempts and is left alone.

getCreatedAt()

Returns: Date

When this timer was created, which is normally when the originating event occurred. Required.

getFireAt()

Returns: Date

The date and time this timer becomes due. In practice it will not fire at exactly this time, but some time afterwards, when the background process next picks up due timers. Required.

getProcessingStartedAt()

Returns: Date

When a process last claimed this timer. It is set and committed immediately on claiming, which keeps other processes off the timer until the configured timeout has passed.

getCompletedProcessingAt()

Returns: Date

When the timer was successfully processed. A timer with this set is finished and is never picked up again.

getFireForProfile()

Returns: Profile

The profile the re-fired event applies to, which becomes the source profile of the delayed event. Optional and lazily loaded.

getWebsite()

Returns: Website

The website the originating event applied to, carried through so the delayed event is evaluated in the same site context. Optional and lazily loaded.

getNotes()

Returns: String

Free text description, up to 2048 characters, of what created this timer, recorded for auditing.

getContactRequest()

Returns: ContactRequest

If this delay was caused by a contact request, the request data it came from. It is passed to the delayed event as an attribute. Lazily loaded.

getEventCondition1()

Returns: String

First condition value captured from the event which created this timer, replayed when the delayed event is fired so it is matched exactly as the original would have been.

getEventCondition2()

Returns: String

Second condition value captured from the event which created this timer, replayed when the delayed event is fired so it is matched exactly as the original would have been.

getEventCondition3()

Returns: String

Third condition value captured from the event which created this timer, replayed when the delayed event is fired so it is matched exactly as the original would have been.

getEventCondition4()

Returns: String

Fourth condition value captured from the event which created this timer, replayed when the delayed event is fired so it is matched exactly as the original would have been.

getEventCondition5()

Returns: String

Fifth condition value captured from the event which created this timer, replayed when the delayed event is fired so it is matched exactly as the original would have been.

getManuallyFired()

Returns: Boolean

Marks a timer that was fired on demand rather than by the scheduled process which picks up due timers. It is set by whatever fired it; null means it was not.

manuallyFired()

Returns: boolean

Null safe reading of the manually fired flag.

To get full access to the Kademi Hub existing customers can login here, or new customers can register here.