aboutsummaryrefslogtreecommitdiffstats
path: root/cron.php
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2021-12-21 08:57:53 +0100
committerJulien Veyssier <julien-nc@posteo.net>2024-05-02 16:43:40 +0200
commit52eb6d87263302a520e0d78a3ec3f9e86ecf477f (patch)
tree47d6af83b0bbeeebdbd839cb4d003bbd341c2fa3 /cron.php
parent8694675a2635f06a5cac59253aa1ec45a019ee8a (diff)
downloadnextcloud-server-52eb6d87263302a520e0d78a3ec3f9e86ecf477f.tar.gz
nextcloud-server-52eb6d87263302a520e0d78a3ec3f9e86ecf477f.zip
feat(bg-jobs): Allow calling cron.php with a background job class
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'cron.php')
-rw-r--r--cron.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/cron.php b/cron.php
index e39c998ad5d..f6ca95fe226 100644
--- a/cron.php
+++ b/cron.php
@@ -160,7 +160,8 @@ try {
$endTime = time() + 14 * 60;
$executedJobs = [];
- while ($job = $jobList->getNext($onlyTimeSensitive)) {
+ $jobClass = isset($argv[1]) ? $argv[1] : null;
+ while ($job = $jobList->getNext($onlyTimeSensitive, $jobClass)) {
if (isset($executedJobs[$job->getId()])) {
$jobList->unlockJob($job);
break;