aboutsummaryrefslogtreecommitdiffstats
path: root/teal-src/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2022-05-05 14:10:59 +0200
committerKim Alvefur <zash@zash.se>2022-05-05 14:10:59 +0200
commit38c67064b3d36738e5db241041612eaeed6e79b4 (patch)
tree81a32c962193fb12677d8684cc4ca78929cb418c /teal-src/plugins
parentf0fc620d2ac2fdec1c3e78cbae8052fd91e21a07 (diff)
downloadprosody-38c67064b3d36738e5db241041612eaeed6e79b4.tar.gz
prosody-38c67064b3d36738e5db241041612eaeed6e79b4.zip
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.
Diffstat (limited to 'teal-src/plugins')
-rw-r--r--teal-src/plugins/mod_cron.tl1
1 files changed, 1 insertions, 0 deletions
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