Table of Contents

Interface ICronExpression

Namespace
Excalibur.Dispatch.Delivery
Assembly
Excalibur.Dispatch.dll

Represents a parsed cron expression with timezone awareness.

public interface ICronExpression
Extension Methods

Properties

Expression

Gets the original cron expression string.

string Expression { get; }

Property Value

string

The original cron expression string.

IncludesSeconds

Gets a value indicating whether the cron expression includes seconds field.

bool IncludesSeconds { get; }

Property Value

bool

A value indicating whether the cron expression includes seconds field.

TimeZone

Gets the timezone for which this cron expression should be evaluated.

TimeZoneInfo TimeZone { get; }

Property Value

TimeZoneInfo

The timezone for which this cron expression should be evaluated.

Methods

GetNextOccurrence(DateTimeOffset)

Calculates the next occurrence of the cron expression after the specified time.

DateTimeOffset? GetNextOccurrence(DateTimeOffset from)

Parameters

from DateTimeOffset

The time from which to calculate the next occurrence.

Returns

DateTimeOffset?

The next occurrence time, or null if there is no next occurrence.

IsValid()

Validates whether the cron expression is valid.

bool IsValid()

Returns

bool

True if the expression is valid; otherwise, false.