Crate clokwerk[−][src]
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
- schedule-rs and job_scheduler are two other Rust scheduler libraries. Both use
cron
syntax for scheduling.
Modules
timeprovider |
Structs
AsyncJob | An asynchronous job to run on the scheduler.
Create these by calling |
AsyncScheduler | An asynchronous job scheduler, for use with |
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 |
Enums
Interval |
Traits
Job | This trait provides an abstraction over |
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. |