JobScheduler

A scheduler is the core component of the library; you add jobs to the job scheduler, and then it will execute these according to the job's schedule.

Members

Functions

addCronJob
void addCronJob(Job job, string cronExpressionString)

Adds a job to the scheduler, whose schedule is defined by the given cron expression string.

addJob
void addJob(ScheduledJob job)

Adds a job to the scheduler.

addJob
void addJob(Job job, JobSchedule schedule)

Adds a job to the scheduler, with the given schedule to define when it should be run.

addJob
void addJob(void function() fn, JobSchedule schedule)

Adds a simple job that executes the given function according to the given schedule.

start
void start()

Starts the scheduler. Once started, there is no guarantee that all scheduler implementations will allow adding new jobs while running.

stop
void stop(bool force)

Stops the scheduler.

stop
void stop()

Stops the scheduler, and waits for any currently-executing jobs to finish. Functionally equivalent to calling stop(false).

Meta