From 3a071d87b8dd5d6d29b79a4166e3ef0fda83df1a Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sun, 30 Jul 2023 13:03:40 +0200 Subject: mod_cron: Revert bbd3ac65640d Maybe it is better to run daily and weekly tasks 'now' on the theory that people set these things up during times that are appropriate for maintenance already, so the same time next day or next week might be fine for periodic cleanup. --- teal-src/prosody/plugins/mod_cron.tl | 5 ----- 1 file changed, 5 deletions(-) (limited to 'teal-src/prosody') diff --git a/teal-src/prosody/plugins/mod_cron.tl b/teal-src/prosody/plugins/mod_cron.tl index b71b5f74..357294d6 100644 --- a/teal-src/prosody/plugins/mod_cron.tl +++ b/teal-src/prosody/plugins/mod_cron.tl @@ -56,11 +56,6 @@ function module.add_host(host_module : moduleapi) task.save = save_task; module:log("debug", "%s task %s added, last run %s", task.when, task.id, task.last and datetime.datetime(task.last) or "never"); - if task.last == nil then - -- initialize new tasks so e.g. daily tasks run at ~midnight UTC for now - local now = os.time(); - task.last = now - now % periods[task.when]; - end return true; end -- cgit v1.2.3