Properly deschedule active tasks (#1413)

This commit is contained in:
schroda
2025-05-27 02:45:48 +02:00
committed by GitHub
parent 218af8ea54
commit 89421946af
2 changed files with 2 additions and 2 deletions

View File

@@ -110,7 +110,7 @@ object ProtoBackupExport : ProtoBackupBase() {
}
}
HAScheduler.scheduleCron(task, "$backupMinute $backupHour */${backupInterval.inWholeDays} * *", "backup")
backupSchedulerJobId = HAScheduler.scheduleCron(task, "$backupMinute $backupHour */${backupInterval.inWholeDays} * *", "backup")
}
private fun createAutomatedBackup() {

View File

@@ -163,7 +163,7 @@ class Updater : IUpdater {
}
}
HAScheduler.schedule(::autoUpdateTask, updateInterval, timeToNextExecution, "global-update")
currentUpdateTaskId = HAScheduler.schedule(::autoUpdateTask, updateInterval, timeToNextExecution, "global-update")
}
private fun isRunning(): Boolean =