• 0 Posts
  • 17 Comments
Joined 1 year ago
cake
Cake day: August 8th, 2023

help-circle



















  • let mut scheduler = Scheduler::with_tz(chrono::Utc);
    
    scheduler.every(10.minutes()).plus(30.seconds()).run(|| println!("Periodic task"));
    
    scheduler.every(1.day()).at("3:20 pm").run(|| println!("Daily task")); 
    
    scheduler.every(Tuesday).at("14:20:17").and_every(Thursday).at("15:00").run(|| println!("Biweekly task")); 
    

    Damn, that a really ingenious and intuitive use of the builder pattern.

    Kudos to the devs!