JoobQ.Schedules (joobq_ex v0.8.0)

Copy Markdown View Source

Cron and interval job schedules, registered from code with POST /sdk/schedules (JoobQ.register_schedule/4).

A schedule is idempotent by its name: registering the same name again updates it in place. It fires on the server, which enqueues the job onto its queue at every tick; a worker of that queue runs it. Editing, pausing and deleting schedules are console operations, not the SDK's.

Options:

  • :cron (a 5- or 6-field expression) or :every ("<count> <unit>", e.g. "30 seconds"): exactly one.
  • :timezone: the cron's time zone, "UTC" by default.
  • :payload: the job's payload, %{} by default.
  • :max_retries: 0 to 100, 3 by default.
  • :encrypt_fields, :unique_key: as for JoobQ.enqueue/4 (JoobQ.Job).

Summary

Functions

The body of POST /sdk/schedules; raises ArgumentError naming a wrong option, never its value.

Functions

body(name, queue, job_type, opts)

@spec body(String.t(), String.t(), String.t(), keyword()) :: map()

The body of POST /sdk/schedules; raises ArgumentError naming a wrong option, never its value.