Interface ICronExpression
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
fromDateTimeOffsetThe 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.