Continuum.Schedules (continuum v0.7.1)

Copy Markdown View Source

Durable one-shot 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.

Loads a schedule for operational inspection.

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.

get(schedule_id, opts \\ [])

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

Loads a schedule for operational inspection.

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.