setInterval(self::resolveInterval($config)); // Must stay TIME_SENSITIVE. If `maintenance_window_start` is set in // config.php — and Nextcloud's admin overview actively nags admins // to set it — CronService only picks up TIME_INSENSITIVE jobs during // those 4 hours and skips them for the rest of the day. A job whose // whole point is a 5-minute (configurable down to 60s) reaction time // would then run a handful of times per night and look completely // dead in between. $this->setTimeSensitivity(IJob::TIME_SENSITIVE); $this->setAllowParallelRuns(false); } private static function resolveInterval(IConfig $config): int { $interval = $config->getSystemValueInt(self::INTERVAL_CONFIG_KEY, self::DEFAULT_INTERVAL); return max(self::MINIMUM_INTERVAL, $interval); } protected function run($argument): void { $this->runner->run(); } }