l10n->t('Cron last run'); } public function run(): SetupResult { $lastCronRun = $this->appConfig->getValueInt('core', 'lastcron', 0); $relativeTime = $this->dateTimeFormatter->formatTimeSpan($lastCronRun); if ((time() - $lastCronRun) > 3600) { return SetupResult::error( $this->l10n->t( 'Last background job execution ran %s. Something seems wrong. {link}.', [$relativeTime] ), descriptionParameters:[ 'link' => [ 'type' => 'highlight', 'id' => 'backgroundjobs', 'name' => 'Check the background job settings', 'link' => $this->urlGenerator->linkToRoute('settings.AdminSettings.index', ['section' => 'server']) . '#backgroundjobs', ], ], ); } else { return SetupResult::success( $this->l10n->t( 'Last background job execution ran %s.', [$relativeTime] ) ); } } }