Metadata-Version: 2.4
Name: z4j-apscheduler
Version: 1.5.0
Summary: z4j scheduler adapter for APScheduler (Apache 2.0)
Project-URL: Changelog, https://github.com/z4jdev/z4j-apscheduler/blob/main/CHANGELOG.md
Project-URL: Documentation, https://z4j.dev
Project-URL: Homepage, https://z4j.com
Project-URL: Issues, https://github.com/z4jdev/z4j-apscheduler/issues
Project-URL: Source, https://github.com/z4jdev/z4j-apscheduler
Author: z4j contributors
License: Apache-2.0
License-File: LICENSE
Keywords: apscheduler,cron,dramatiq,scheduler,z4j
Classifier: Development Status :: 5 - Production/Stable
Classifier: Framework :: AsyncIO
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: System :: Distributed Computing
Classifier: Typing :: Typed
Requires-Python: >=3.11
Requires-Dist: apscheduler>=3.11.2
Requires-Dist: z4j-core<2,>=1.4.0
Description-Content-Type: text/markdown

# z4j-apscheduler

[![PyPI version](https://img.shields.io/pypi/v/z4j-apscheduler.svg?v=1.4.0)](https://pypi.org/project/z4j-apscheduler/)
[![Python](https://img.shields.io/pypi/pyversions/z4j-apscheduler.svg?v=1.4.0)](https://pypi.org/project/z4j-apscheduler/)
[![License](https://img.shields.io/pypi/l/z4j-apscheduler.svg?v=1.4.0)](https://github.com/z4jdev/z4j-apscheduler/blob/main/LICENSE)

The APScheduler adapter for [z4j](https://z4j.com).

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

## What it ships

| Capability | Notes |
|---|---|
| List schedules | every job APScheduler currently tracks |
| Create schedule | date / interval / cron triggers |
| Update | trigger spec, args, kwargs, paused flag |
| Enable / disable | via APScheduler's pause / resume |
| Trigger now | runs the job immediately, outside the schedule |
| Delete | clean removal from the jobstore |
| Boot inventory | full snapshot at agent connect; existing jobs show up without editing |

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

## Install

```bash
pip install z4j-apscheduler
```

```python
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",
)
```

## Reliability

- No exception from the adapter ever propagates back into APScheduler
  or your job code.
- Jobstore writes use APScheduler's normal transactional semantics; the
  adapter only observes and surfaces, it does not rewrite the store.

## Documentation

Full docs at [z4j.dev/schedulers/apscheduler/](https://z4j.dev/schedulers/apscheduler/).

## License

Apache-2.0, see [LICENSE](LICENSE).

## Links

- Homepage: https://z4j.com
- Documentation: https://z4j.dev
- PyPI: https://pypi.org/project/z4j-apscheduler/
- Issues: https://github.com/z4jdev/z4j-apscheduler/issues
- Changelog: [CHANGELOG.md](CHANGELOG.md)
- Security: security@z4j.com (see [SECURITY.md](SECURITY.md))
