You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: server/lib/classes/cronjob.inc.php
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -103,7 +103,7 @@ protected function onPrepare() {
103
103
// check the run time and values for this job
104
104
105
105
// remove stale cronjobs
106
-
$data = $app->db->queryAllRecords("SELECT `last_run` FROM `sys_cron` WHERE `name` = ? AND (`last_run` IS NOT NULL AND `last_run` < DATE_SUB(NOW(), INTERVAL 24 HOUR)) AND `running` = 1", get_class($this));
106
+
$data = $app->db->queryAllRecords("SELECT `name`, `last_run` FROM `sys_cron` WHERE `name` = ? AND (`last_run` IS NOT NULL AND `last_run` < DATE_SUB(NOW(), INTERVAL 24 HOUR)) AND `running` = 1", get_class($this));
107
107
foreach ($dataas$rec) {
108
108
if($conf['log_priority'] <= LOGLEVEL_WARN) print"Removing stale sys_cron entry for ".get_class($this)." (last run ".$rec['last_run'].")\n";
109
109
$app->db->query("DELETE FROM `sys_cron` WHERE `name` = ? AND `last_run` = ? AND `running` = 1", $rec['name'], $rec['last_run']);
@@ -149,10 +149,10 @@ protected function onBeforeRun() {
149
149
150
150
// next_run time reached (reached === 0 or -1)
151
151
152
-
// calculare next run time based on last_run or current time
152
+
// calculate next run time based on last_run or current time
153
153
$app->cron->parseCronLine($this->getSchedule());
154
154
if($this->_no_skip == true) {
155
-
// we need to calculare the next run based on the previous next_run, as we may not skip one.
155
+
// we need to calculate the next run based on the previous next_run, as we may not skip one.
0 commit comments