Crate clokwerk

Source
Expand description

§Clokwerk, a simple scheduler

Clokwerk is a simple scheduler, inspired by Python’s Schedule and Ruby’s clockwork. It uses a similar DSL for scheduling, rather than parsing cron strings.

§Usage

§Synchronous

See Scheduler.

§Asynchronous

See AsyncScheduler.

§Caveats

Some combinations of times or intervals are permissible, but make little sense, e.g. every(10.seconds()).at("16:00"), which would next run at the next 4 PM after the next multiple of 10 seconds.

§Similar libraries

Modules§

timeprovider

Structs§

AsyncJob
An asynchronous job to run on the scheduler. Create these by calling AsyncScheduler::every().
AsyncScheduler
An asynchronous job scheduler, for use with Futures.
ScheduleHandle
Guard object for the scheduler background thread. The thread is terminated if this object is dropped, or ScheduleHandle::stop() is called
Scheduler
Synchronous job scheduler
SyncJob
A job to run on the scheduler. Create these by calling Scheduler::every().

Enums§

Interval

Traits§

Job
This trait provides an abstraction over SyncJob and AsyncJob, covering all the methods relating to scheduling, rather than execution.
NextTime
TimeUnits
A trait for easily expressing common intervals. Each method generates an appropriate Interval. Plural and non-plural forms behave identically, but exist to make code more grammatical.