Skip to main content

z4j-rqscheduler

The native RQ Scheduler adapter for z4j, with dashboard management of native schedules. Dashboard management needs the z4j server, z4j-core, z4j-bare and this adapter from the same release, plus the producer setup below.

Compatibility

rq-scheduler 0.11+ and the RQ version required by z4j-rq; Python 3.11+.

Installation and producer setup

Install z4j-rqscheduler and z4j-bare from the same release wave, plus the native scheduler and broker/store dependencies used by your application. The example assumes your task code, writable application-state directory and agent credentials already exist. Use the project UUID from agent registration.

import os
from redis import Redis
from rq_scheduler import Scheduler
from z4j_bare import install_agent
from z4j_rqscheduler import RqSchedulerAdapter
from myapp.jobs import cleanup

scheduler = Scheduler(connection=Redis.from_url(os.environ["REDIS_URL"]), queue_name="default")
adapter = RqSchedulerAdapter(
    scheduler=scheduler, managed=True, tasks={"myapp.cleanup": cleanup},
)
agent = install_agent(
    engines=[], schedulers=[adapter],
    brain_url=os.environ["Z4J_BRAIN_URL"], token=os.environ["Z4J_TOKEN"],
    hmac_secret=os.environ["Z4J_HMAC_SECRET"], project_id=os.environ["Z4J_PROJECT_ID"],
)
try:
    scheduler.run()
finally:
    agent.stop()

Every producer sharing this Redis schedule registry must install managed=True. The ordinary uninstrumented rq-scheduler CLI must not run alongside it. The managed producer uses Redis transactions to arbitrate dispatch against edits and pauses. Redis retains definitions and a separate paused registry, so a producer restart preserves both. Configure Redis persistence for Redis restarts. An adapter with the default managed=False provides inventory and manual runs; it does not advertise dashboard writes.

Dashboard controls

The connected producer supports inventory, create, edit, pause, resume, delete and Run now. A write is complete only after z4j accepts a snapshot confirming the native source. The dashboard uses the current connection's advertised capabilities; an unavailable producer cannot accept new edits. Repeating an operation ID does not submit it twice. A timeout or uncertain outcome requires inspection before submitting a new request.

A pause prevents future scheduling. Work already queued or running can finish. Run now submits an additional execution without resuming a paused schedule. Native scheduling keeps the upstream scheduler's timing and delivery semantics; it does not acquire z4j-scheduler's catch-up, overlap or exactly-once guarantees. Queue task history requires the corresponding engine adapter in the workers.

Supported definitions and limits

  • Create/edit supports native cron, positive integer interval seconds and offset-aware one-shot datetimes, in UTC.
  • Queue selection is supported; an RQ worker must consume the selected queue.
  • tasks={name: callable} registers new task choices. Existing jobs also supply their registered function reference; arbitrary dashboard imports are not accepted.
  • Pause preserves the scheduled definition. Resume reactivates it. Delete removes scheduling without deleting execution history.
  • Run now enqueues immediately without adding a second schedule or resetting the repeat cadence.

Metadata

Release files for z4j-rqscheduler 1.13.0

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-rqscheduler 1.13.0
File Size Uploaded
z4j_rqscheduler-1.13.0.tar.gz 23.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for z4j-rqscheduler 1.13.0
File Interpreter ABI Platform
z4j_rqscheduler-1.13.0-py3-none-any.whl Python 3 none any Details

Total release size: 44.1 kB

Release files / z4j_rqscheduler-1.13.0.tar.gz

Download URL z4j_rqscheduler-1.13.0.tar.gz
Size 23.6 kB
Tags Source
SHA-256 checksum
How to use checksums
486c5f0c79827035c31f0405c95b4d390bca3a53df6ed1231033ef75a6237f88
BLAKE2b-256 checksum
How to use checksums
024d2c064025bdd7d501d6a4f1da7d75adff3b93e2f1a05c764ab453b531985c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / z4j_rqscheduler-1.13.0-py3-none-any.whl

Download URL z4j_rqscheduler-1.13.0-py3-none-any.whl
Size 20.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b3ed5356b63ee1335ebfb35d7f89d2bdbc9a76dcdb2228d2b1e5c37f4fe3b187
BLAKE2b-256 checksum
How to use checksums
aa0412db72160caa04fedec3a6c3580456b06d42eb3f5e980651a108d840bb83
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.13.0 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