Continuum.Schedules (continuum v0.8.5)

Copy Markdown View Source

Durable one-shot and UTC interval workflow scheduling.

Schedules preallocate a stable run ID. A runner may retry across any crash window, but the same scheduled occurrence can create at most one run.

Summary

Functions

Cancels a schedule that has not begun starting its run.

Creates a recurring UTC interval definition. See Continuum.RecurringSchedules.create/4 for overlap, missed-occurrence, and catch-up policies.

Loads a schedule for operational inspection.

Loads one recurring definition.

Lists a definition's occurrences, including overlap skips, using bounded pagination.

Lists recurring definitions using bounded keyset pagination.

Pauses future occurrence generation; existing occurrences keep their current state.

Resumes generation using the definition's recorded missed-occurrence policy.

Creates a durable one-shot schedule.

Functions

cancel(schedule_id, opts \\ [])

@spec cancel(
  binary(),
  keyword()
) :: :ok | {:error, :not_found | :already_started | term()}

Cancels a schedule that has not begun starting its run.

every(workflow, input, every_ms, opts \\ [])

Creates a recurring UTC interval definition. See Continuum.RecurringSchedules.create/4 for overlap, missed-occurrence, and catch-up policies.

get(schedule_id, opts \\ [])

@spec get(
  binary(),
  keyword()
) :: {:ok, map()} | {:error, :not_found | term()}

Loads a schedule for operational inspection.

get_recurring(id, opts \\ [])

Loads one recurring definition.

list_occurrences(id, opts \\ [])

Lists a definition's occurrences, including overlap skips, using bounded pagination.

list_recurring(opts \\ [])

Lists recurring definitions using bounded keyset pagination.

pause_recurring(id, opts \\ [])

Pauses future occurrence generation; existing occurrences keep their current state.

resume_recurring(id, opts \\ [])

Resumes generation using the definition's recorded missed-occurrence policy.

schedule_at(workflow, input, scheduled_at, opts \\ [])

@spec schedule_at(module(), term(), DateTime.t(), keyword()) ::
  {:ok, binary()} | {:error, term()}

Creates a durable one-shot schedule.