Skip to content

Commit

Permalink
cron: Adapt to 5 minutes recommendation
Browse files Browse the repository at this point in the history
Update the comment to make clear that we ask for 14 minutes worth of
jobs on purpose so at most three parallel cron jobs are running.

Signed-off-by: Michael Kuhn <michael@ikkoku.de>
  • Loading branch information
michaelkuhn committed Feb 17, 2020
1 parent cb81fd5 commit ab6a18f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cron.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,9 @@
// Work
$jobList = \OC::$server->getJobList();

// We only ask for jobs for 14 minutes, because after 15 minutes the next
// system cron task should spawn.
// We only ask for jobs for 14 minutes, because after 5 minutes the next
// system cron task should spawn and we want to have at most three
// cron jobs running in parallel.
$endTime = time() + 14 * 60;

$executedJobs = [];
Expand Down

0 comments on commit ab6a18f

Please sign in to comment.