feat(cron) call the module

This commit is contained in:
lumither committed 2024-11-20 19:26:33 -08:00
1 parent e26003f430
commit 7f400470ff
5 files changed
+51 -22

No files matched your search

+11
View File
@@ -0,0 +1,11 @@
use crate::blog;
use crate::scheduler::Scheduler;
pub fn start() {
let scheduler = Scheduler::new();
let _ = vec![blog::cron::get_tasks()]
.into_iter()
.map(|list| scheduler.insert_list(list))
.collect::<Vec<_>>();
scheduler.start().unwrap()
}