summaryrefslogtreecommitdiffstats
path: root/cron.php
diff options
context:
space:
mode:
Diffstat (limited to 'cron.php')
-rw-r--r--cron.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/cron.php b/cron.php
index 4c86407b944..ba17c899894 100644
--- a/cron.php
+++ b/cron.php
@@ -122,8 +122,11 @@ try {
// Work and success :-)
$jobList = \OC::$server->getJobList();
$job = $jobList->getNext();
- $job->execute($jobList, $logger);
- $jobList->setLastJob($job);
+ if ($job != null)
+ {
+ $job->execute($jobList, $logger);
+ $jobList->setLastJob($job);
+ }
OC_JSON::success();
}
}