CronExpression class

Represents a parsed cron expression with individual part accessors.

Supports both Standard (5-part) and Quartz (6-7 part) cron formats.

final expr = CronExpression.fromString('0 30 9 ? * MON-FRI');
print(expr.toReadableString()); // Human-readable description
print(expr.toString());         // Back to cron string

Constructors

CronExpression(CronSecond second, CronMinute minute, CronHour hour, CronDay _day, CronMonth month, CronYear year, CronExpressionType type)
CronExpression.fromString(String cronExpression)
Parses a cron expression string into a CronExpression.
factory

Properties

dayOfMonth → DayOfMonth
The day-of-month part (1-31, or special values like L, W).
no setter
dayOfWeek → DayOfWeek
The day-of-week part (0-6 or SUN-SAT, or special values like #, L).
no setter
hashCode int
The hash code for this object.
no setterinherited
hour → CronHour
The hours part (0-23).
final
minute → CronMinute
The minutes part (0-59).
final
month → CronMonth
The month part (1-12 or JAN-DEC).
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
second → CronSecond
The seconds part (Quartz only, empty for Standard).
final
type CronExpressionType
Whether this is a CronExpressionType.standard or CronExpressionType.quartz expression.
final
year → CronYear
The year part (Quartz only, empty for Standard).
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reset() → void
Resets all parts to their default wildcard values.
toFormatString(CronExpressionOutputFormat outputFormat) String
Returns the cron expression as a string using the specified outputFormat.
toReadableString() String
Returns a human-readable description of the cron expression.
toString() String
Returns the cron expression as a string using CronExpressionOutputFormat.auto.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited