aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_cron.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2021-12-04 17:46:37 +0100
committerKim Alvefur <zash@zash.se>2021-12-04 17:46:37 +0100
commitd48fa1de17cf1435ae733053b8e65e295f2b622f (patch)
treefab46efd7b7482f17761e2530d4a4a4b8ba0c80a /plugins/mod_cron.lua
parent8bef874d8f780bbe63dc4b9a5e1d27ba87c267d7 (diff)
downloadprosody-d48fa1de17cf1435ae733053b8e65e295f2b622f.tar.gz
prosody-d48fa1de17cf1435ae733053b8e65e295f2b622f.zip
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.
Diffstat (limited to 'plugins/mod_cron.lua')
-rw-r--r--plugins/mod_cron.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/mod_cron.lua b/plugins/mod_cron.lua
index cbb551e8..f18d3a9a 100644
--- a/plugins/mod_cron.lua
+++ b/plugins/mod_cron.lua
@@ -49,7 +49,7 @@ local function run_task(task)
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