aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_cron.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/mod_cron.lua b/plugins/mod_cron.lua
index 257bf399..8d38c227 100644
--- a/plugins/mod_cron.lua
+++ b/plugins/mod_cron.lua
@@ -21,6 +21,10 @@ function module.add_host(host_module)
task.save = save_task;
module:log("debug", "%s task %s added, last run %s", task.when, task.id,
task.last and require("util.datetime").datetime(task.last) or "never");
+ if task.last == nil and task.when == "daily" then
+ local now = os.time();
+ task.last = now - now % 86400;
+ end
return true
end