summaryrefslogtreecommitdiffstats
path: root/cron.php
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2014-02-11 14:00:24 +0100
committerRobin Appelman <icewind@owncloud.com>2014-02-11 14:00:24 +0100
commita6399f9ceffcf9865b8a2be155dc4f98bd2ee5dc (patch)
tree513f0a0dac1049c21c42538e39dc4d886d3e6f3b /cron.php
parent72f134cfce05eb089a6d8271e73d6eb95cbe94a4 (diff)
downloadnextcloud-server-a6399f9ceffcf9865b8a2be155dc4f98bd2ee5dc.tar.gz
nextcloud-server-a6399f9ceffcf9865b8a2be155dc4f98bd2ee5dc.zip
Add the background job list to the public server container
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);