diff options
author | Matthew Wild <mwild1@gmail.com> | 2025-01-07 18:06:29 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2025-01-07 18:06:29 +0000 |
commit | d58c6ae7ca37c591411f72217676a52183bcf126 (patch) | |
tree | b1d4b3a4fd12a98ac5391beeb454c6cc5fcbc8fc /plugins/mod_cron.lua | |
parent | c7005840e686f06d92137a43bd6db0d6744a4482 (diff) | |
download | prosody-d58c6ae7ca37c591411f72217676a52183bcf126.tar.gz prosody-d58c6ae7ca37c591411f72217676a52183bcf126.zip |
mod_cron: Don't run tasks if loaded inside prosodyctl
It's common for modules to depend on mod_cron, and this can lead to it loading
inside prosodyctl, where we don't really want to run any cron tasks.
Diffstat (limited to 'plugins/mod_cron.lua')
-rw-r--r-- | plugins/mod_cron.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/mod_cron.lua b/plugins/mod_cron.lua index 29c1aa93..67b68514 100644 --- a/plugins/mod_cron.lua +++ b/plugins/mod_cron.lua @@ -8,6 +8,10 @@ local cron_spread_factor = module:get_option_number("cron_spread_factor", 0); local active_hosts = {} +if prosody.process_type == "prosodyctl" then + return; -- Yes, it happens... +end + function module.add_host(host_module) local last_run_times = host_module:open_store("cron", "map"); |