Software /
code /
prosody
Comparison
teal-src/plugins/mod_cron.tl @ 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 | 12186:7f25ac9d8f0d |
comparison
equal
deleted
inserted
replaced
12001:5a8c6f9a4583 | 12002:cbed7d8d8f35 |
---|---|
10 end | 10 end |
11 | 11 |
12 local enum frequency | 12 local enum frequency |
13 "hourly" | 13 "hourly" |
14 "daily" | 14 "daily" |
15 "weekly" | |
15 end | 16 end |
16 | 17 |
17 local record task_spec | 18 local record task_spec |
18 id : string -- unique id | 19 id : string -- unique id |
19 name : string -- name or short description | 20 name : string -- name or short description |
26 local record task_event | 27 local record task_event |
27 source : module | 28 source : module |
28 item : task_spec | 29 item : task_spec |
29 end | 30 end |
30 | 31 |
31 local periods : { frequency : integer } = { hourly = 3600, daily = 86400 } | 32 local periods : { frequency : integer } = { hourly = 3600, daily = 86400, weekly = 7*86400 } |
32 | 33 |
33 local active_hosts : { string : boolean } = { } | 34 local active_hosts : { string : boolean } = { } |
34 | 35 |
35 function module.add_host(host_module : moduleapi) | 36 function module.add_host(host_module : moduleapi) |
36 | 37 |