aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/moduleapi.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/moduleapi.lua b/core/moduleapi.lua
index 82b1faf3..6a91a045 100644
--- a/core/moduleapi.lua
+++ b/core/moduleapi.lua
@@ -521,6 +521,11 @@ function api:daily(name, fun)
self:cron({ name = name; when = "daily"; run = fun });
end
+function api:weekly(name, fun)
+ if type(name) == "function" then fun, name = name, nil; end
+ self:cron({ name = name; when = "weekly"; run = fun });
+end
+
local path_sep = package.config:sub(1,1);
function api:get_directory()
return self.resource_path or self.path and (self.path:gsub("%"..path_sep.."[^"..path_sep.."]*$", "")) or nil;