mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
MDL-73923 tool_task: make a more relaxed check on cron run interval
Prior to this change, the tool_task_cronrunning check had very tight limits for checking the last cron interval and comparing it to the expected frequency. When a cron job should take 1:00 min and the last run was 1:02 min it complained that there was 1:02 between the last two runs of the cron maintenance script and it should run every 1:00. This change makes the check a bit more relaxed and adds an additional minute on top of the expectedfrequency to give the cron job some time. Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
This commit is contained in:
parent
1d99ba19a2
commit
a4d64bd71b
@ -109,7 +109,8 @@ class cronrunning extends check {
|
||||
return new result($status, $summary, $details);
|
||||
}
|
||||
|
||||
if ($lastcroninterval > $expectedfrequency) {
|
||||
// Add MINSECS to avoid spurious warning if cron is only a few seconds overdue.
|
||||
if ($lastcroninterval > $expectedfrequency + MINSECS) {
|
||||
$status = result::WARNING;
|
||||
$summary = get_string('croninfrequent', 'admin', [
|
||||
'actual' => $formatinterval,
|
||||
|
Loading…
x
Reference in New Issue
Block a user