NeatPeriodicTaskScheduler class

A NeatPeriodicTaskScheduler runs a NeatPeriodicTask periodically.

This is intended to be robust way to schedule a periodic task. If the task fails it will schedule the task again later. This will not crash if the task consistently fails. Instead users should monitor for the continuous verification that the task has completed successfully.

Constructors

NeatPeriodicTaskScheduler({required String name, required Duration interval, required Duration timeout, required NeatPeriodicTask task, NeatStatusProvider? status, Duration minCycle = const Duration(minutes: 5), Duration maxCycle = const Duration(hours: 3)})
Create a NeatPeriodicTaskScheduler.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
start() → void
Start the scheduler.
stop() Future<void>
Stop the scheduler.
toString() String
A string representation of this object.
inherited
trigger() Future<void>
Trigger the task, if it's not already running.

Operators

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