diff options
author | Kim Alvefur <zash@zash.se> | 2022-05-05 14:10:59 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2022-05-05 14:10:59 +0200 |
commit | 38c67064b3d36738e5db241041612eaeed6e79b4 (patch) | |
tree | 81a32c962193fb12677d8684cc4ca78929cb418c /plugins | |
parent | f0fc620d2ac2fdec1c3e78cbae8052fd91e21a07 (diff) | |
download | prosody-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 'plugins')
-rw-r--r-- | plugins/mod_cron.lua | 1 |
1 files changed, 1 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 |