CronExpression class

Cron expression parser and evaluator Supports standard cron format: minute hour day month dayOfWeek Format: * * * * * (minute hour day month dayOfWeek)

Special characters:

    • any value , - value list separator (e.g., 1,3,5)
    • range (e.g., 1-5) / - step values (e.g., */5 for every 5 minutes)

Constructors

CronExpression.parse(String expression)
Parse a cron expression Format: minute hour dayOfMonth month dayOfWeek Example: "0 9 * * " = every day at 9:00 AM Example: "/5 * * * *" = every 5 minutes Example: "0 0 1 * *" = first day of every month at midnight
factory

Properties

daysOfMonth List<int>
final
daysOfWeek List<int>
final
expression String
final
hashCode int
The hash code for this object.
no setterinherited
hours List<int>
final
minutes List<int>
final
months List<int>
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

describe() String
Get a human-readable description of the schedule
getNextRun(DateTime after) DateTime?
Get the next run time after a given DateTime
matches(DateTime dateTime) bool
Check if the expression matches a given DateTime
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

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