Crate schedule_flows

source ·
Expand description

Make flow function acting as scheduled task in

Quick Start

To get started, let’s write a task that will send a message to Slack at a fixed time wach day.

use schedule_flows::{schedule_cron_job, schedule_handler};
use slack_flows::send_message_to_channel;

#[tokio::main(flavor = "current_thread")]
pub async fn on_deploy() {
    schedule_cron_job(String::from("50 8 * * *"), String::from("cron_job_evoked")).await;

async fn handler(body: Vec<u8>) {

schedule_cron_job() will create a cron job. The handler decorated by macro schedule_handler will be called when the job is evoked at 8:50 UTC each day.


Attribute Macros