Skip to content

Commit 0e6d59d

Browse files
committed
Add missing name field, used in the delete query three lines down.
1 parent a80ceba commit 0e6d59d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/lib/classes/cronjob.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ protected function onPrepare() {
103103
// check the run time and values for this job
104104

105105
// 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));
107107
foreach ($data as $rec) {
108108
if($conf['log_priority'] <= LOGLEVEL_WARN) print "Removing stale sys_cron entry for ".get_class($this)." (last run ".$rec['last_run'].")\n";
109109
$app->db->query("DELETE FROM `sys_cron` WHERE `name` = ? AND `last_run` = ? AND `running` = 1", $rec['name'], $rec['last_run']);

0 commit comments

Comments
 (0)