From 47c1cc394b44cee6600ce8246cee664016fa62bd Mon Sep 17 00:00:00 2001
From: "Hahn Axel (hahn)" <axel.hahn@iml.unibe.ch>
Date: Thu, 12 Sep 2019 15:54:51 +0200
Subject: [PATCH] use a minmal ttl value before warning

---
 classes/cronlog-renderer.class.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/classes/cronlog-renderer.class.php b/classes/cronlog-renderer.class.php
index 085ed76..cfd3453 100644
--- a/classes/cronlog-renderer.class.php
+++ b/classes/cronlog-renderer.class.php
@@ -94,7 +94,7 @@ class cronlogrenderer extends cronlog{
             $iTtlUsed=max($aEntry['SCRIPTTTL'], $this->_iMinTtl);
             $iNextRun=$aEntry['SCRIPTSTARTTIME']+((int)$aEntry['SCRIPTTTL']*60);
             $iNextRunWarn=$aEntry['SCRIPTSTARTTIME']+((int)$iTtlUsed*60);
-            $iNextRunErr=$aEntry['SCRIPTSTARTTIME']+((int)$aEntry['SCRIPTTTL']+(int)$this->_iExpiredJobsFailAfter*60);
+            $iNextRunErr=$aEntry['SCRIPTSTARTTIME']+(((int)$aEntry['SCRIPTTTL']+(int)$this->_iExpiredJobsFailAfter)*60);
             
             if($iNextRunErr < date("U")){
                 $aErrors[]='outdated since ' . date("Y-m-d H:i", $iNextRunErr) . ' (+'.$this->_iExpiredJobsFailAfter.'min)';
-- 
GitLab