MutableJobScheduler

A job scheduler which offers additional functionality for modifying the set of scheduled jobs after they're submitted.

Members

Functions

removeScheduledJob
bool removeScheduledJob(ScheduledJob job)

Removes a job from the scheduler.

Inherited Members

From JobScheduler

getDefault
JobScheduler getDefault()

Gets a default job scheduler that's recommended to use for most cases.

addScheduledJob
void addScheduledJob(ScheduledJob job)

Adds a job to the scheduler.

addJob
ScheduledJob addJob(Job job, JobSchedule schedule)

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

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

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

addCronJob
ScheduledJob addCronJob(Job job, string cronExpressionString)

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

addCronJob
ScheduledJob addCronJob(void function() fn, string cronExpressionString)

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

getTimeProvider
CurrentTimeProvider getTimeProvider()

Gets this scheduler's time provider.

getNextScheduledJobId
ulong getNextScheduledJobId()

Gets the next available id to assign to a scheduled job. This must be unique among all jobs that have been added to the scheduler but not yet removed.

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. This method blocks until shutdown is complete.

stop
void stop()

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

Meta