Skip to content

taskiq-scheduler

Requires TaskIQ 0.11+, Python 3.11+. See the compatibility matrix for the full pin string.

Terminal window
pip install z4j-taskiqscheduler

The adapter advertises list and read. The standard LabelScheduleSource is decorator-defined, so create, update, delete, enable, disable, and trigger-now are absent. Delete is advertised only when the source overrides delete_schedule; the adapter then delegates to it. With the standard source, which cannot honor it, delete is not advertised.

  • Cron
  • Interval
  • One-shot (at a specific datetime)

If the schedule source fails or one row cannot be mapped, the adapter aborts the authoritative snapshot so a transient error cannot false-delete live schedules from the brain mirror.

Custom async sources must be installed with TaskiqSchedulerAdapter(source=source, source_loop=owner_loop) from TaskIQ's startup lifecycle. z4j runs get_schedules and a supported delete_schedule on that owner loop exactly once and forwards cancellation. The exact stock LabelScheduleSource keeps an unbound in-memory read fallback; subclasses and other custom sources fail closed without an owner loop.

If you move scheduling to z4j-scheduler, z4j-scheduler import --from taskiq --taskiq-broker pkg.tkq:broker --project <slug> reads the schedule labels from the broker's task registry, and z4j-scheduler export --to taskiq renders the label attachments back as a Python module you review and apply.

taskiq.