Comparison

plugins/mod_cron.lua @ 12002:cbed7d8d8f35

mod_cron: Add a 'weekly' job frequency
author Kim Alvefur <zash@zash.se>
date Fri, 03 Dec 2021 09:05:41 +0100
parent 12001:5a8c6f9a4583
child 12009:f6fff0658108
comparison
equal deleted inserted replaced
12001:5a8c6f9a4583 12002:cbed7d8d8f35
1 module:set_global(); 1 module:set_global();
2 2
3 local async = require("util.async"); 3 local async = require("util.async");
4 local datetime = require("util.datetime"); 4 local datetime = require("util.datetime");
5 5
6 local periods = { hourly = 3600; daily = 86400 } 6 local periods = { hourly = 3600; daily = 86400; weekly = 7 * 86400 }
7 7
8 local active_hosts = {} 8 local active_hosts = {}
9 9
10 function module.add_host(host_module) 10 function module.add_host(host_module)
11 11