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.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.9.0
File Size Uploaded
z4j_apscheduler-1.9.0.tar.gz 24.0 kB Details

Built distribution (wheel)

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

Total release size: 43.1 kB

Release files / z4j_apscheduler-1.9.0.tar.gz

Download URL z4j_apscheduler-1.9.0.tar.gz
Size 24.0 kB
Tags Source
SHA-256 checksum
How to use checksums
c93b61522c21cc1249dc9f8d07d8529a5892cb55ce67d863fe13442c31fdbd3e
BLAKE2b-256 checksum
How to use checksums
96f7feb85333d6a84d0e70a1ad41cfe44746d90ec789e9ec99623fd7884830b2
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.0-py3-none-any.whl

Download URL z4j_apscheduler-1.9.0-py3-none-any.whl
Size 19.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
27c243e959d2b869bb2fb60390942d5809d605316250bb6b735d02cbb1017102
BLAKE2b-256 checksum
How to use checksums
9fa50ec3ffad706d639b8885f4baee9967169b8a599a77578d2790ab67a64654
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

1.9.1

2 release files

This release

1.9.0 This release

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