CronSchedule class
Cron-style scheduling for periodic tasks.
Supports standard 5-field cron expressions:
minute hour day-of-month month day-of-week
Examples:
- "0 9 * * MON" → Every Monday at 9:00 AM
- "0 */6 * * *" → Every 6 hours
- "0 0 1 * *" → First day of every month at midnight
- "*/15 * * * *" → Every 15 minutes
- "0 9-17 * * 1-5" → Every hour from 9am-5pm on weekdays
Field meanings:
- Minute (0-59)
- Hour (0-23)
- Day of month (1-31)
- Month (1-12 or JAN-DEC)
- Day of week (0-6 where 0=Sunday, or SUN-SAT)
Special characters:
*= any value,= multiple values (e.g., MON,WED,FRI)-= range (e.g., 9-17)/= step (e.g., */5 = every 5 units)
Constructors
- CronSchedule(String expression)
-
const
Properties
- expression → String
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
isValid(
) → bool - Parse and validate cron expression
-
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
Constants
- daily → const CronSchedule
- dailyAt9am → const CronSchedule
- every5Minutes → const CronSchedule
- every15Minutes → const CronSchedule
- every30Minutes → const CronSchedule
- everyMinute → const CronSchedule
- Common presets
- hourly → const CronSchedule
- monthly → const CronSchedule
- weeklyMonday → const CronSchedule