Is there any library for the queueing mechanism?

What’s used by the most - Cron? But a task or rather script executed by Cron won’t access to the context of an application. Meaning, a task will have be an independent unit. Whereas I want is a library to use inside a project such that it’ll have access to everything.

Anything similar to Sidekiq exist in Rust?

  • SuddenlyBlowGreen@lemmy.world
    link
    fedilink
    arrow-up
    5
    ·
    edit-2
    1 year ago
    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!