From a6297d032472a8958d20fe446010deb14ea783e7 Mon Sep 17 00:00:00 2001 From: "Michael Kaufmann (d00p)" Date: Mon, 25 Jan 2010 16:25:46 +0000 Subject: [PATCH] don't forget to update 'lastrun' when cron gets included --- lib/functions/froxlor/function.getNextCronjobs.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/functions/froxlor/function.getNextCronjobs.php b/lib/functions/froxlor/function.getNextCronjobs.php index 8c056c62..4ce739d3 100644 --- a/lib/functions/froxlor/function.getNextCronjobs.php +++ b/lib/functions/froxlor/function.getNextCronjobs.php @@ -24,7 +24,7 @@ */ function getNextCronjobs() { - $sql = "SELECT `cronfile` FROM `".TABLE_PANEL_CRONRUNS."` WHERE `interval` <> '0' AND ("; + $sql = "SELECT `id`, `cronfile` FROM `".TABLE_PANEL_CRONRUNS."` WHERE `interval` <> '0' AND ("; /* * 5M - 5 minute cronjob (reqular) */ @@ -51,6 +51,7 @@ function getNextCronjobs() while($row = $db->fetch_array($result)) { $cron_files[] = $row['cronfile']; + $db->query("UPDATE `".TABLE_PANEL_CRONRUNS."` SET `lastrun` = UNIX_TIMESTAMP() WHERE `id` ='".(int)$result['id']."';"); } return $cron_files;