Skip to main content

z4j-apscheduler

PyPI version Python License

The APScheduler adapter for z4j.

Surfaces APScheduler jobs on the dashboard's Schedules page, read, enable, disable, trigger, delete. Engine-agnostic: works alongside any z4j engine adapter, or as a standalone scheduler in projects without a queue engine.

Compatibility

  • APScheduler 3.10.2+ and <4 (capped below the APScheduler 4.x rewrite)
  • Python 3.11+

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

What it ships

Capability Notes
List schedules every job APScheduler currently tracks
Enable / disable via APScheduler's pause / resume
Trigger now sets the existing job's next_run_time to now; subsequent timing follows APScheduler's normal trigger semantics
Delete clean removal from the jobstore
Boot inventory full snapshot at agent connect; existing jobs show up without editing

Create and update are not yet supported: the adapter surfaces and controls the jobs you define in your own APScheduler setup, and the brain greys out create / update for this scheduler.

Supports every APScheduler jobstore: in-memory, SQLAlchemy (Postgres / SQLite / MySQL), MongoDB, Redis.

Install

pip install z4j-bare z4j-apscheduler
import os

from apscheduler.schedulers.background import BackgroundScheduler
from apscheduler.triggers.cron import CronTrigger
from z4j_bare import install_agent
from z4j_apscheduler import APSchedulerAdapter

scheduler = BackgroundScheduler()
scheduler.add_job(my_func, CronTrigger(minute="*/5"), id="cleanup")
scheduler.start()

install_agent(
    engines=[],  # APScheduler runs jobs in-process; no separate engine
    schedulers=[APSchedulerAdapter(scheduler=scheduler)],
    brain_url="https://brain.example.com",
    token="z4j_agent_...",
    project_id="my-project",
    hmac_secret=os.environ["Z4J_HMAC_SECRET"],
)

Reliability

  • Inventory and listener failures are isolated from APScheduler job code.
  • Operator controls call APScheduler's normal pause, resume, remove, and modify_job APIs and therefore mutate the configured jobstore. A control that exceeds its 10-second timeout is reported as indeterminate because its worker thread may still complete the mutation.

Documentation

Full docs at z4j.dev/schedulers/apscheduler/.

License

Apache-2.0, see LICENSE.

Links

Metadata

Release files for z4j-apscheduler 1.10.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-apscheduler 1.10.0
File Size Uploaded
z4j_apscheduler-1.10.0.tar.gz 24.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for z4j-apscheduler 1.10.0
File Interpreter ABI Platform
z4j_apscheduler-1.10.0-py3-none-any.whl Python 3 none any Details

Total release size: 43.1 kB

Release files / z4j_apscheduler-1.10.0.tar.gz

Download URL z4j_apscheduler-1.10.0.tar.gz
Size 24.1 kB
Tags Source
SHA-256 checksum
How to use checksums
c3d7b7727dcb5e5f710c5e0917d567efd80faa26ad1dd196c216971bb199face
BLAKE2b-256 checksum
How to use checksums
da33b615116f5a4f84598e914ae0c6bb9dd445425a6002fda2c475e215114129
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / z4j_apscheduler-1.10.0-py3-none-any.whl

Download URL z4j_apscheduler-1.10.0-py3-none-any.whl
Size 19.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
96b047c1cf0ad5563a3f4aaa4ed6f879c7cfdcd95151867b969e2784663fcab0
BLAKE2b-256 checksum
How to use checksums
781352a06d7a67bec3f8b5176e3d48a1204e20b64818fe17998b19e9374f0177
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

1.11.0

2 release files

This release

1.10.0 This release

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