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://docs.z4j.com/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 docs.z4j.com/schedulers/apscheduler/.

License

Apache-2.0, see LICENSE.

Metadata

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

Built distribution (wheel)

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

Total release size: 43.2 kB

Release files / z4j_apscheduler-1.12.0.tar.gz

Download URL z4j_apscheduler-1.12.0.tar.gz
Size 24.1 kB
Tags Source
SHA-256 checksum
How to use checksums
a3dcd3b9c20fd1ec9fbb0d71a82f8a06181075f096286ab08703a095ca6aa73f
BLAKE2b-256 checksum
How to use checksums
8a8f08354c3a6a5e22427e802ad6b11d6305ae1ef4b08952e257404b7db910eb
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.12.0-py3-none-any.whl

Download URL z4j_apscheduler-1.12.0-py3-none-any.whl
Size 19.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cc5f51d26fbee7fbb049dacdc130441e8ac778fa0f8a35dcd0efb83246a16724
BLAKE2b-256 checksum
How to use checksums
a886dbe19d2b49cce5ba9cd268f8d73591d9099f8460c7562c47a26a4f6f19d8
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.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