macro_rules! run_cron_task {
($($var:ident),+ $(,)?) => { ... };
}Expand description
运行添加了#scheduled属性的方法
#Example
#[scheduled(cron = "*/1 * * * * *")]
async fn func1() {
println!("func1");
}
#[tokio::main]
async fn main() {
run_cron_task!(func1);
}