Share via


DurableTaskWorkerOptions.MaximumTimerInterval Property

Definition

Gets or sets the maximum timer interval for the CreateTimer(TimeSpan, CancellationToken) method.

public TimeSpan MaximumTimerInterval { get; set; }
member this.MaximumTimerInterval : TimeSpan with get, set
Public Property MaximumTimerInterval As TimeSpan

Property Value

Remarks

The default maximum timer interval is 3 days. If a CreateTimer(TimeSpan, CancellationToken) call specifies a 7-day timer, it will be implemented using three separate timers: two for 3 days and one for 1 day.

Long timers are broken up into smaller timers to support certain types of backend storage providers which have limits on how long a durable timer entity can be created. For example, the Azure Storage state provider uses scheduled queue messages to implement durable timers, but scheduled queue messages cannot exceed 7 days. In order to support longer durable timers, a long timer is broken up into smaller timers internally. This division into multiple timers is not visible to user code. However, it is visible in the generated orchestration history.

Be aware that changing this setting may be breaking for in-flight orchestrations. For example, if an existing orchestration has created a timer that exceeds the maximum interval (e.g., a 7 day timer), and this value is subsequently changed to a higher value (e.g., from 3 days to 10 days) then the next reply of the existing orchestration will fail with a non-determinism error because the number of intermediate timers scheduled during the replay (e.g., one timer) will no longer match the number of timers that exist in the orchestration history (e.g., two timers).

To avoid accidentally breaking existing orchestrations, this value should only be changed for new applications with no state or when an application is known to have no in-flight orchestration instances.

WARNING: Changing this value from a previously configured value is a breaking change for in-flight orchestrations.

Applies to