-
Notifications
You must be signed in to change notification settings - Fork 27
/
crontab.config
38 lines (36 loc) · 1.35 KB
/
crontab.config
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
%%------------------------------------------------------------------------------
%%
%% the cron tab running in erlang
%%
%% please see also crontab(5) : man 5 crontab
%%
%% field allowed values
%% ----- --------------
%% minute(m) 0-59
%% hour(h) 0-23
%% day of month(dom) 1-31
%% month(mon) 1-12
%% day of week(dow) 0-7 (0 or 7 is Sun)
%%
%% Format:
%%
%% {{m, h, dom, mon, dow}, {M, F, A}}.
%% M:F(A) is excuted in a new erlang process
%%
%% Some exampls:
%%
%% {{0, 2, "*", "*", "*"}, {io, format, ["hello~n"]}}.
%% print "hello" in hour 2 ervery day
%%
%% {{"0-59/2", "*", "*", "*", "*"}, {erlang, garbage, [whereis(user)]}}.
%% do the garbage collect on user process, every 2 minitues(0, 2, ..., 58)
%%
%% {{0, "0-12/2,12-23/1", "*", "*", "*"}, {io, format, ["crontab!~n"]}}.
%% print "crontab!", every 2 hours between 0 and 12, every 1 hour between 12 and 23
%%
%%-----------------------------------------------------------------------------
{{"0-59/5", "*", "*", "*", "*"}, {lib_log, online_num, []}}. %% 在线人数统计
{{10, 4, "*", "*", "*"}, {mod_arena, update_rank, []}}. %% 更新竞技排行榜
{{20, 4, "*", "*", "*"}, {lib_log, user_stat, []}}. %% 每天用户(注册、活跃、在线)统计
{{30, 4, "*", "*", "*"}, {lib_log, retention, []}}. %% 留存统计
%% vim: ft=erlang :