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.9.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-apscheduler 1.9.1
File Size Uploaded
z4j_apscheduler-1.9.1.tar.gz 24.1 kB Details

Built distribution (wheel)

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

Total release size: 43.1 kB

Release files / z4j_apscheduler-1.9.1.tar.gz

Download URL z4j_apscheduler-1.9.1.tar.gz
Size 24.1 kB
Tags Source
SHA-256 checksum
How to use checksums
f337cc93605410e18fd07061ca87440feecca0d740e744662acbef57d28a5679
BLAKE2b-256 checksum
How to use checksums
0ff2e81cbd80c77f341874aff323190593485a5b9e355399421ab348b4acb020
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.9.1-py3-none-any.whl

Download URL z4j_apscheduler-1.9.1-py3-none-any.whl
Size 19.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
40c9b92a32a09ca8c67a21ade5e08806d24ce7f60ac686ac820a56be75b46216
BLAKE2b-256 checksum
How to use checksums
398f59a289aa8d4fa123bb2abfcfde3a191034669974cfedf6971b8ffd958631
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

1.10.0

2 release files

This release

1.9.1 This release

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