Commit 2df03bce authored by Marius Burkard's avatar Marius Burkard

- don't treat cron jobs as running when last run is older than 24h

parent 2b3eb82d
Pipeline #1422 passed with stage
in 3 minutes and 8 seconds
...@@ -100,7 +100,7 @@ class cronjob { ...@@ -100,7 +100,7 @@ class cronjob {
// check the run time and values for this job // check the run time and values for this job
// get previous run data // get previous run data
$data = $app->db->queryOneRecord("SELECT `last_run`, `next_run`, `running` FROM `sys_cron` WHERE `name` = ?", get_class($this)); $data = $app->db->queryOneRecord("SELECT `last_run`, `next_run`, IF(`last_run` IS NOT NULL AND `last_run` < DATE_SUB(NOW(), INTERVAL 24 HOUR), 0, `running`) as `running` FROM `sys_cron` WHERE `name` = ?", get_class($this));
if($data) { if($data) {
if($data['last_run']) $this->_last_run = $data['last_run']; if($data['last_run']) $this->_last_run = $data['last_run'];
if($data['next_run']) $this->_next_run = $data['next_run']; if($data['next_run']) $this->_next_run = $data['next_run'];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment