“I'm late! I'm late! For a very important date!” by “The White Rabbit” 『Alice's Adventures in Wonderland』
white_rabbit schedules your tasks and can repeat them!
One funny use case are chat bot commands: Imagine a remind me-command, the command gets executed and you simply create a one-time job to be scheduled for whatever time the user desires.
We are using chrono's
DateTime<Utc>, enabling you to serialise and thus
backup currently running tasks,
in case you want to shutdown/restart your application,
constructing a new scheduler is doable.
However, please make sure your internal clock is synced.
When a task is due, this will be passed to the task. Currently, there is not much use to this. However, this might be extended in the future.
Every job gets a planned
ISO 8601 combined date and time with time zone.
ISO 8601 time duration with nanosecond precision. This also allows for the negative duration; see individual methods for details.
This scheduler exists on two levels: The handle, granting you the ability of adding new tasks, and the executor, dating and executing these tasks when specified time is met.
The UTC time zone. This is the most efficient time zone when you don't need the local time. It is also used as an offset (which is also a dummy type).
Every task will return this