dox_scheduler library

Task scheduler for the Dox framework. Run functions (or queue jobs) on a cron schedule, once per tick across isolates and servers.

Classes

CronExpression
A standard 5 field cron expression: minute hour day-of-month month day-of-week.
Schedule
The list of tasks. Your schedule() function fills it:
ScheduleClock
Gives the time and waits. Inject a fake one in tests to move time.
ScheduleConfig
Settings of the scheduler. Keep one in lib/config/schedule.dart.
ScheduledTask
One task of the schedule. Made by Schedule.call().
Scheduler
Runs the tasks. SchedulerRunner and SchedulerProvider use it.
SchedulerProvider
Runs the schedule inside the running Dox app, when ScheduleConfig(inProcess: true). Extend it in your app, so the generated container finds it:
SchedulerRunner
The command line of bin/schedule.dart:
ScheduleZone
A time zone for a task: UTC or an IANA name like Asia/Yangon.

Enums

TaskOutcome
What happened to a task in one tick.

Typedefs

TaskCallback = FutureOr<void> Function()
The work of a task. It can return a Future, like a queue dispatch().
TaskErrorHook = FutureOr<void> Function(Object error, StackTrace stack)
A hook of onFailure().
TaskFilter = FutureOr<bool> Function()
A filter of when() and skip().