#tasks #scheduling #running #fixed #intervals #tool #duration

periodic

Simple scheduling tool for running tasks at fixed intervals

2 releases

Uses old Rust 2015

0.1.1 Oct 13, 2018
0.1.0 Jul 15, 2018

#17 in #intervals

Download history 49/week @ 2023-12-17 27/week @ 2023-12-24 36/week @ 2023-12-31 30/week @ 2024-01-07 31/week @ 2024-01-14 67/week @ 2024-01-21 36/week @ 2024-01-28 67/week @ 2024-02-04 78/week @ 2024-02-11 135/week @ 2024-02-18 152/week @ 2024-02-25 106/week @ 2024-03-03 110/week @ 2024-03-10 76/week @ 2024-03-17 125/week @ 2024-03-24 129/week @ 2024-03-31

461 downloads per month
Used in kipa

GPL-3.0 license

17KB
238 lines

periodic

Crates.io Documentation

Simple scheduling tool for running tasks at fixed intervals.


lib.rs:

Simple scheduling tool for running tasks at fixed intervals.

Handles all threads for scheduling and running tasks. Note that callbacks passed in must be able to execute asynchronously, and therefore require traits Fn (not FnMut), Sync, and Send. They must also have a 'static lifetime.

Example usage

use std::time::Duration;

let mut planner = periodic::Planner::new();
planner.add(
    || println!("every three seconds"),
    periodic::Every::new(Duration::from_secs(3)),
);
planner.start();

See ./examples for more detailed usage.

No runtime deps