diff --git a/src/NzbDrone.Core/Jobs/TaskManager.cs b/src/NzbDrone.Core/Jobs/TaskManager.cs index 19e6645ba..bd1211a93 100644 --- a/src/NzbDrone.Core/Jobs/TaskManager.cs +++ b/src/NzbDrone.Core/Jobs/TaskManager.cs @@ -118,9 +118,19 @@ namespace NzbDrone.Core.Jobs private int GetBackupInterval() { - var interval = _configService.BackupInterval; + var intervalMinutes = _configService.BackupInterval; - return interval * 60 * 24; + if (intervalMinutes < 1) + { + intervalMinutes = 1; + } + + if (intervalMinutes > 7) + { + intervalMinutes = 7; + } + + return intervalMinutes * 60 * 24; } private int GetRssSyncInterval() @@ -154,7 +164,7 @@ namespace NzbDrone.Core.Jobs public void HandleAsync(ConfigSavedEvent message) { var rss = _scheduledTaskRepository.GetDefinition(typeof(RssSyncCommand)); - rss.Interval = _configService.RssSyncInterval; + rss.Interval = GetRssSyncInterval(); var backup = _scheduledTaskRepository.GetDefinition(typeof(BackupCommand)); backup.Interval = GetBackupInterval();