One-time or recurring background workflow schedule contract.
Summary
Functions
Returns the next trigger time after a completed trigger.
Returns the supported schedule cancellation policies.
Returns the supported misfire policies.
Builds and validates one schedule.
Returns the supported overlap policies.
Types
@type t() :: %Jidoka.Workflow.Schedule{ cancellation: :future_only | :future_and_active, cron: Crontab.CronExpression.t() | nil, enabled: boolean(), id: String.t(), input: map(), misfire: :skip | :run_once, misfire_grace_ms: non_neg_integer(), next_at: DateTime.t() | nil, overlap: :skip | :allow, retry: Jidoka.Workflow.RetryPolicy.t() | nil, run_opts: keyword(), timezone: String.t(), trigger: trigger(), workflow: module() }
@type trigger() :: {:at, DateTime.t()} | {:cron, String.t()}
Functions
@spec advance(t(), DateTime.t()) :: {:ok, t()} | {:error, term()}
Returns the next trigger time after a completed trigger.
@spec cancellation_policies() :: [:future_only | :future_and_active]
Returns the supported schedule cancellation policies.
@spec misfire_policies() :: [:skip | :run_once]
Returns the supported misfire policies.
Builds and validates one schedule.
@spec overlap_policies() :: [:skip | :allow]
Returns the supported overlap policies.