IntervalScheduleSpec class

Schedule specification for fixed time intervals.

Fires every time the specified every duration passes.

Inheritance

Constructors

IntervalScheduleSpec({required Duration every, DateTime? startAt, DateTime? endAt})
Creates an interval-based schedule.
IntervalScheduleSpec.fromJson(Map<String, Object?> json)
Reconstructs an interval spec from a JSON map.
factory
IntervalScheduleSpec.fromLegacy(String legacy)
Parses a legacy every: expression.
factory

Properties

endAt → DateTime?
Optional absolute timestamp after which this schedule ceases to fire.
final
every → Duration
The duration between consecutive runs.
final
hashCode → int
The hash code for this object.
no setterinherited
kind → String
The discriminator kind for this specification.
finalinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
startAt → DateTime?
Optional absolute timestamp when this schedule starts being active. If provided, calculation of intervals will be relative to this date.
final

Methods

copyWith({Duration? every, Object? startAt = _sentinel, Object? endAt = _sentinel}) → IntervalScheduleSpec
Returns a copy of the specification with optional field overrides.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, Object?>
Serializes this interval schedule to JSON-friendly data.
override
toString() → String
A string representation of this object.
inherited

Operators

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