Files
2026-05-19 11:30:21 +08:00

80 lines
3.4 KiB
SQL
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
%%-----------------------------------------------------------------------------
%%
%% 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)
%% server open day 0-infinity
%%
%% Format:
%%
%% {{m, h, dom, mon, dow}, {M, F, A}}.
%% M:F(A) is excuted in a new erlang process
%%
%% {{m, h, dom, mon, dow, dos}, {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)
%%
%% {{1-59/15, "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
%%
%%-----------------------------------------------------------------------------
%% demo, say hello ervery minitues
%%{{"*", "*", "*", "*", "*"}, {io, format, ["^_^ hello by crontab\n"]}}.
%%----------------------------------------------------------------------
%%
%%
%% {{"0-59/1", "*", "*", "*", "*"}, {Module, Fun, Args}}.
%%----------------------------------------------------------------------
{{"0-59/1", "*", "*", "*", "*"}, {role_gs, cast_online, [{on_minute_refresh}]}}.
{{"0-59/1", "*", "*", "*", "*"}, {ms_process, cast, [activity_schedule_gs, {on_minute_refresh}]}}.
{{"0-59/1", "*", "*", "*", "*"}, {ms_process, cast, [behavior_tree_gs, on_minute_refresh]}}.
%%----------------------------------------------------------------------
%%
%%
%% {{"0", "0-23/1", "*", "*", "*"}, {Module, Fun, Args}}.
%%----------------------------------------------------------------------
{{"0", "0-23/1", "*", "*", "*"}, {role_gs, cast_online, [{on_hour_refresh}]}}.
%%----------------------------------------------------------------------
%% 0
%%
%% {{"0", "0", "*", "*", "*"}, {Module, Fun, Args}}.
%%----------------------------------------------------------------------
{{"0", "0", "*", "*", "*"}, {role_gs, cast_online, [{on_day_refresh}]}}.
{{"0", "0", "*", "*", "*"}, {ms_process, cast, [activity_daily_hosting_gs, {on_day_refresh}]}}.
{{"0", "0", "*", "*", "*"}, {rank_gs, cast_all, [on_day_refresh]}}.
{{"0", "0", "*", "*", "*"}, {role_mgr_gs, on_new_day, []}}.
%%----------------------------------------------------------------------
%% 0
%%
%% {{"0", "5", "*", "*", "1"}, {Module, Fun, Args}}.
%%----------------------------------------------------------------------
{{"0", "0", "*", "*", 1}, {role_gs, cast_online, [{on_week_refresh}]}}.
{{"0", "0", "*", "*", 1}, {rank_gs, cast_all, [on_week_refresh]}}.
%%----------------------------------------------------------------------
%% %10
%%
%% {{"0", "0", "1", "*", "*"}, {Module, Fun, Args}}.
%%--------------------------------------------------------------------
{{"0", "0", "1", "*", "*"}, {role_gs, cast_online, [{on_month_refresh}]}}.
{{"0", "0", "1", "*", "*"}, {rank_gs, cast_all, [on_month_refresh]}}.