Skip to content

arq-cron

Package: z4j-arqcron - arq 0.25+.

Terminal window
pip install z4j-arqcron

arq’s cron jobs are declared in WorkerSettings.cron_jobs:

from arq.cron import cron
async def weekly_roundup(ctx):
...
class WorkerSettings:
cron_jobs = [cron(weekly_roundup, weekday="mon", hour=9)]

This is code. To add a cron job, you deploy new code. z4j reads the running worker’s cron_jobs and shows them; it cannot add new ones at runtime.

  • Function name, cron expression, next run (computed).
  • Recent executions (from events).
  • Changes to cron_jobs require a worker restart; z4j re-syncs on next connect.
  • arq doesn’t expose a runtime pause. If you need pause, wrap your function body in a feature-flag check.

arq.