Diff

plugins/mod_cron.lua @ 12489:8b42575738f0 0.12

mod_cron: Fix recording last task run time #1751 The type checks, they do nothing! Observed: Tasks that were supposed to run weekly or daily were running each hour.
author Kim Alvefur <zash@zash.se>
date Thu, 05 May 2022 14:10:59 +0200
parent 12186:7f25ac9d8f0d
child 12977:74b9e05af71e
line wrap: on
line diff
--- a/plugins/mod_cron.lua	Tue May 03 19:36:17 2022 +0200
+++ b/plugins/mod_cron.lua	Thu May 05 14:10:59 2022 +0200
@@ -45,6 +45,7 @@
 local function run_task(task)
 	local started_at = os.time();
 	task:run(started_at);
+	task.last = started_at;
 	task:save(started_at);
 end