set last run of letsencrypt cron when called in webserver-cron

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2019-07-11 08:39:26 +02:00
parent 8b417c044c
commit db3c95ea10
3 changed files with 13 additions and 11 deletions

View File

@@ -361,4 +361,14 @@ class Cronjob
die($message);
}
public static function updateLastRunOfCron($cronname)
{
$upd_stmt = Database::prepare("
UPDATE `" . TABLE_PANEL_CRONRUNS . "` SET `lastrun` = UNIX_TIMESTAMP() WHERE `cronfile` = :cron;
");
Database::pexecute($upd_stmt, array(
'cron' => $cronname
));
}
}