Open zhengxingjian opened 1 year ago
`
use tokio_cron_scheduler::{Job, JobScheduler};
async fn main() -> Result<(), Box> { let sched = JobScheduler::new().await?;
sched.add(Job::new("0 0/1 15 * * ?", move |uuid, l| { println!("15th run....."); })?).await?; // sched.start().await?; tokio::spawn(async move {sched.start().await}); tokio::time::sleep(core::time::Duration::from_secs(10000)).await; Ok(())
}
NO Support using local time
`
use tokio_cron_scheduler::{Job, JobScheduler};
[tokio::main]
async fn main() -> Result<(), Box> {
let sched = JobScheduler::new().await?;
}
`