From d0787d56709d4edff25d8be8f7a76e74e3d74586 Mon Sep 17 00:00:00 2001 From: Oluwatobi Bamidele Date: Mon, 22 Jul 2024 23:03:46 +0100 Subject: [PATCH] temporary update: ensured back up runs every hour and see how it handles when we have more than on backup --- src/backup.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/backup.rs b/src/backup.rs index 482c976c..d3aa0e12 100644 --- a/src/backup.rs +++ b/src/backup.rs @@ -300,9 +300,10 @@ pub async fn delete_old_backups(bucket: &str, retention_days: i64) -> Result<()> pub async fn backup_and_delete_volumes_cron() -> Result { log::info!(":backup and delete volumes"); let sched = JobScheduler::new().await?; + // @daily sched - .add(Job::new_async("@daily", |_uuid, _l| { + .add(Job::new_async("0 0 * * * *", |_uuid, _l| { Box::pin(async move { if !BACK_AND_DELETE.load(Ordering::Relaxed) { BACK_AND_DELETE.store(true, Ordering::Relaxed);