summaryrefslogtreecommitdiffstats
path: root/cron.php
diff options
context:
space:
mode:
Diffstat (limited to 'cron.php')
-rw-r--r--cron.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/cron.php b/cron.php
index 0d2c07b2d95..44ca421328b 100644
--- a/cron.php
+++ b/cron.php
@@ -97,7 +97,7 @@ try {
touch(TemporaryCronClass::$lockfile);
// Work
- $jobList = new \OC\BackgroundJob\JobList();
+ $jobList = \OC::$server->getJobList();
$jobs = $jobList->getAll();
foreach ($jobs as $job) {
$job->execute($jobList, $logger);
@@ -109,7 +109,7 @@ try {
OC_JSON::error(array('data' => array('message' => 'Backgroundjobs are using system cron!')));
} else {
// Work and success :-)
- $jobList = new \OC\BackgroundJob\JobList();
+ $jobList = \OC::$server->getJobList();
$job = $jobList->getNext();
$job->execute($jobList, $logger);
$jobList->setLastJob($job);