diff options
author | Julius Härtl <jus@bitgrid.net> | 2021-12-21 08:57:53 +0100 |
---|---|---|
committer | Julien Veyssier <julien-nc@posteo.net> | 2024-05-02 16:43:40 +0200 |
commit | 52eb6d87263302a520e0d78a3ec3f9e86ecf477f (patch) | |
tree | 47d6af83b0bbeeebdbd839cb4d003bbd341c2fa3 /cron.php | |
parent | 8694675a2635f06a5cac59253aa1ec45a019ee8a (diff) | |
download | nextcloud-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.php | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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; |