Skip to main content

z4j-arqcron

PyPI version Python License

The arq cron-jobs scheduler adapter for z4j.

Surfaces registered cron jobs from your arq WorkerSettings class that the adapter can map on the dashboard's Schedules page, read-only (list and read).

Compatibility

  • arq 0.26+ (no upper bound)
  • Python 3.11+

Full per-adapter matrix at https://docs.z4j.com/reference/compatibility/.

What it ships

Capability Notes
List schedules registered cron_jobs entries that the adapter can map
Read by registered name
Boot inventory full snapshot at agent connect; existing cron jobs show up without editing

This adapter is read-only by design. arq cron jobs are defined declaratively on the WorkerSettings class, and arq exposes no runtime enable/disable toggle or trigger-now primitive, so create / update / delete / enable / disable / trigger now are all out of scope, those need a deploy round-trip (or, for a one-off run, enqueue the underlying coroutine via ArqRedis.enqueue_job()). The dashboard hides buttons it can't honor.

Install

pip install z4j-arq z4j-arqcron
import os

from arq import cron
from z4j_bare import install_agent
from z4j_arq import ArqEngineAdapter
from z4j_arqcron import ArqCronAdapter

async def cleanup(ctx):
    ...

class WorkerSettings:
    redis_settings = ...  # arq.connections.RedisSettings
    functions = [cleanup]
    cron_jobs = [
        cron(cleanup, minute=set(range(0, 60, 5))),
    ]

install_agent(
    engines=[
        ArqEngineAdapter(
            redis_settings=WorkerSettings.redis_settings,
            function_names=["cleanup"],
        ),
    ],
    schedulers=[ArqCronAdapter(cron_jobs=WorkerSettings.cron_jobs)],
    brain_url="https://brain.example.com",
    token="z4j_agent_...",
    project_id="my-project",
    hmac_secret=os.environ["Z4J_HMAC_SECRET"],
)

Pairs with

Reliability

  • The cron-jobs registry is read-only at runtime; inventory reads do not rewrite WorkerSettings. A mapping failure aborts the authoritative snapshot so one bad row cannot false-delete a live schedule from the brain mirror.

Documentation

Full docs at docs.z4j.com/schedulers/arq-cron/.

License

Apache-2.0, see LICENSE.

Metadata

Release files for z4j-arqcron 1.12.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for z4j-arqcron 1.12.1
File Size Uploaded
z4j_arqcron-1.12.1.tar.gz 10.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for z4j-arqcron 1.12.1
File Interpreter ABI Platform
z4j_arqcron-1.12.1-py3-none-any.whl Python 3 none any Details

Total release size: 20.3 kB

Release files / z4j_arqcron-1.12.1.tar.gz

Download URL z4j_arqcron-1.12.1.tar.gz
Size 10.9 kB
Tags Source
SHA-256 checksum
How to use checksums
4d882bdbcbe32b3a7f258e2466e0ddfc35c415129ca1bcc2fdae827a156287db
BLAKE2b-256 checksum
How to use checksums
72cb6d9fead3f156ad2da492ac7a71c51620fce053ded7f33d207b3223496657
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / z4j_arqcron-1.12.1-py3-none-any.whl

Download URL z4j_arqcron-1.12.1-py3-none-any.whl
Size 9.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
31c0ab5a11f56abb9ec6d477bf650fa11af5136db31d63f11cbfb332cf8f1922
BLAKE2b-256 checksum
How to use checksums
9435f360bc6dbe6e73182234e27e48e63b7c010c6fdd0ef39c0985d2d4ccf287
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release history Release notifications | RSS feed

This release

1.12.1 This release

2 release files

1.11.0

2 release files

1.10.0

2 release files

1.9.1

2 release files

1.9.0

2 release files

1.8.0

2 release files

1.7.0

2 release files

1.6.7

2 release files

1.6.0

2 release files

1.5.0

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page