Skip to content

Commit

Permalink
Merge pull request #259 from stakwork/temp/backup-every-hour
Browse files Browse the repository at this point in the history
temporary update: ensured back up runs every hour and see how it hand…
  • Loading branch information
tobi-bams authored Jul 22, 2024
2 parents e47d0ca + d0787d5 commit 095aad0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/backup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<JobScheduler> {
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);
Expand Down

0 comments on commit 095aad0

Please sign in to comment.