View Source ecrn_agent (erlcron v1.2.1)
Link to this section Summary
Functions
Get job's next execution time
Starts the server with the appropriate job and the appropriate ref
Calculates the duration in milliseconds until the next time a job is to be run.
Validate that a run_when spec specified is correct.
Link to this section Types
-type normalized_period() :: [{integer(), integer(), integer()}].
-type normalized_sched() :: {once, {relative | absolute, integer()}} | {daily, normalized_period()} | {weekly, [integer()], normalized_period()} | {monthly, integer(), normalized_period()}.
-type state() :: #state{}.
Link to this section Functions
-spec cancel(pid()) -> ok.
-spec get_datetime(pid()) -> calendar:datetime().
-spec get_datetime(pid(), local | universal) -> calendar:datetime().
-spec next_run(pid()) -> erlang:timestamp().
-spec normalize(erlcron:run_when(), calendar:datetime()) -> normalized_sched().
-spec recalculate(pid()) -> ok.
-spec set_datetime(pid(), calendar:datetime(), erlcron:milliseconds()) -> ok.
-spec set_datetime(pid(), calendar:datetime(), erlcron:milliseconds(), UTC :: local | universal) -> ok | {error, term()}.
-spec start_link(erlcron:job_ref(), erlcron:job(), erlcron:job_opts()) -> ignore | {error, Reason :: term()} | {ok, pid()}.
-spec until_next_time(erlcron:milliseconds(), erlcron:run_when()) -> erlcron:milliseconds().
-spec validate(erlcron:run_when()) -> ok | {error, term()}.