1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
//! # Siafu
//!
//! An ergonomic job scheduling library for Rust.
//!
//! ## Features
//!
//! - Schedule tasks to run on specific dates/times
//! - Set up recurring intervals (hourly, daily, weekly, monthly)
//! - Schedule jobs using cron expressions for complex patterns
//! - Run jobs at random times within a specified range
//! - Set limits on recurring jobs
//! - Error handling and job monitoring capabilities
//! - Fluent builder API for easy job configuration
//!
//! # Examples
//!
//! Basic usage:
//!
//! ```rust
//! use siafu::{JobBuilder, ScheduleTime, SchedulerError};
//! use std::time::{Duration, SystemTime};
//!
//! fn main() -> Result<(), SchedulerError> {
//! // One-off job after 5 seconds
//! let mut job = JobBuilder::new("example_once")
//! .once(ScheduleTime::Delay(Duration::from_secs(5)))
//! .add_handler(|| println!("Hello after delay!"))
//! .build();
//!
//! // Recurring job every 10 seconds
//! let _recurring = JobBuilder::new("example_recurring")
//! .every(Duration::from_secs(10), None)
//! .add_handler(|| println!("Recurring task"))
//! .build();
//!
//! // Cron-based job
//! let _cron = JobBuilder::new("example_cron")
//! .cron("0 0 * * * * *")
//! .add_handler(|| println!("Hourly task on the hour"))
//! .build();
//!
//! // Run the one-off job
//! job.run()?;
//! Ok(())
//! }
//! ```
pub use JobBuilder;
pub use *;
pub use ;
pub use Error as SchedulerError;
/// Current version of the Siafu library
pub const VERSION: &str = env!;