Crate schedule_rs

Source
Expand description

ci-badge docs-badge crate-version

§schedule-rs

A simple scheduling library inspired by Python’s schedule.

§Sample usage

use schedule_rs::prelude::*;

let function = || {
    println!("Hello World!");
};
let task = Schedule::every().minute().run(function);
TaskRunner::one(task).run();

std::thread::park();

Modules§

prelude
! Basic re-exports.

Structs§

Schedule
Base type for creating tasks.
ScheduleBuilderOne
Builder for time values of 1 (minute, hour, etc).
ScheduleBuilderOnes
Builder for time values of more than one (minutes, hours, etc).
ScheduleBuilderTwo
Builder step that allows you to set a limit and provide the function.
ScheduleBuilderTwoDates
Builder step that allows you to set a limit and provide the function. Also allows to set the time of day.
Scheduled
A built task ready to be run by a runner.
TaskRunner
Runner that runs built tasks.