Software /
code /
prosody
Diff
plugins/mod_cron.lua @ 12009:f6fff0658108
mod_cron: Expose the One Timer via module environment
This makes it easier to reschedule or otherwise manipulate the timer
from e.g. the shell, which is handy for debugging.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 04 Dec 2021 17:46:37 +0100 |
parent | 12002:cbed7d8d8f35 |
child | 12186:7f25ac9d8f0d |
line wrap: on
line diff
--- a/plugins/mod_cron.lua Sat Dec 04 16:48:39 2021 +0100 +++ b/plugins/mod_cron.lua Sat Dec 04 17:46:37 2021 +0100 @@ -49,7 +49,7 @@ end local task_runner = async.runner(run_task); -module:add_timer(1, function() +scheduled = module:add_timer(1, function() module:log("info", "Running periodic tasks"); local delay = 3600; for host in pairs(active_hosts) do