aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/mod_cron.lua1
-rw-r--r--teal-src/plugins/mod_cron.tl1
2 files changed, 2 insertions, 0 deletions
diff --git a/plugins/mod_cron.lua b/plugins/mod_cron.lua
index f0c85615..33d97df6 100644
--- a/plugins/mod_cron.lua
+++ b/plugins/mod_cron.lua
@@ -45,6 +45,7 @@ local function should_run(when, last) return not last or last + periods[when] *
local function run_task(task)
local started_at = os.time();
task:run(started_at);
+ task.last = started_at;
task:save(started_at);
end
diff --git a/teal-src/plugins/mod_cron.tl b/teal-src/plugins/mod_cron.tl
index 1375a195..f3b8f62f 100644
--- a/teal-src/plugins/mod_cron.tl
+++ b/teal-src/plugins/mod_cron.tl
@@ -84,6 +84,7 @@ end
local function run_task(task : task_spec)
local started_at = os.time();
task:run(started_at);
+ task.last = started_at;
task:save(started_at);
end