$logger = \OC::$server->getLogger();
$config = \OC::$server->getConfig();
+ $tempManager = \OC::$server->getTempManager();
// Don't do anything if Nextcloud has not been installed
if (!$config->getSystemValue('installed', false)) {
exit(0);
}
- \OC::$server->getTempManager()->cleanOld();
+ $tempManager->cleanOld();
// Exit if background jobs are disabled!
$appMode = $config->getAppValue('core', 'backgroundjobs_mode', 'ajax');
$logger->debug('CLI cron call has selected job with ID ' . strval($job->getId()), ['app' => 'cron']);
$job->execute($jobList, $logger);
+
// clean up after unclean jobs
\OC_Util::tearDownFS();
+ $tempManager->clean();
$jobList->setLastJob($job);
$executedJobs[$job->getId()] = true;