diff --git a/ee/tabby-webserver/src/service/background_job/helper/cron.rs b/ee/tabby-webserver/src/service/background_job/helper/cron.rs index 4f24a0d9fc62..425256f2020e 100644 --- a/ee/tabby-webserver/src/service/background_job/helper/cron.rs +++ b/ee/tabby-webserver/src/service/background_job/helper/cron.rs @@ -35,14 +35,10 @@ where match next { Some(next) => { let to_sleep = next.clone() - timezone.from_utc_datetime(&Utc::now().naive_utc()); - if to_sleep.num_seconds() < 0 { - // If the next time is in the past, skip it and get the next one. - continue - } let to_sleep = match to_sleep.to_std() { Ok(to_sleep) => to_sleep, - Err(err) => { - warn!("Failed to convert to std duration: {}", err); + Err(_) => { + // If the next time is in the past or conversion fails, skip it and get the next one. continue; } };