<em>🚀 The scheduler that simply works. 🚀</em>
Documentation: https://asyncz.dymmond.com 📚
Source Code: https://github.com/dymmond/asyncz
Asyncz is an async-first scheduler for Python applications and ASGI services. It wraps the core APScheduler model in a codebase that is focused on asyncio, explicit task objects, pluggable stores and executors, and framework-friendly lifecycle integration.
Documentation: https://asyncz.dymmond.com
AsyncIOScheduler and NativeAsyncIOScheduler for async runtimes.date, interval, cron, and, or, and shutdown.memory, file, mongodb, redis, and sqlalchemy.pip install asyncz
Useful extras:
pip install "asyncz[dashboard]"
pip install "asyncz[localtime]"
import logging
from asyncz.schedulers import AsyncIOScheduler
logging.basicConfig(level=logging.INFO)
scheduler = AsyncIOScheduler()
def cleanup() -> None:
logging.getLogger(__name__).info("cleanup finished")
scheduler.add_task(cleanup, "interval", minutes=5, id="cleanup-task")
scheduler.start()
Asyncz is built around four main component types:
Tasks are the public unit of scheduling. A task combines a callable, a trigger, an executor alias, and the metadata needed to persist and reschedule it correctly.
Asyncz uses Python's built-in logging module. The default logger namespaces are:
asyncz.schedulersasyncz.executors.<alias>asyncz.stores.<alias>If you need custom logger creation, pass your own loggers_class to the scheduler. That class only needs to implement the same dictionary-like contract used by ClassicLogging.
Asyncz can wrap an ASGI app directly:
from asyncz.schedulers import AsyncIOScheduler
scheduler = AsyncIOScheduler()
application = scheduler.asgi(application)
Or you can wire startup and shutdown hooks manually:
from asyncz.schedulers import AsyncIOScheduler
scheduler = AsyncIOScheduler()
app = Lilya(
routes=[...],
on_startup=[scheduler.start],
on_shutdown=[scheduler.shutdown],
)
The scheduler also supports synchronous and asynchronous context managers, which makes it easy to use inside lifespan handlers.
The default store is in-memory. For durable scheduling, configure a file, MongoDB, Redis, or SQLAlchemy store.
Persistent stores support the ASYNCZ_STORE_ENCRYPTION_KEY environment variable. When it is set, task payloads are encrypted before they are written to the backing store.
Asyncz ships with:
start, add, list, run, pause, resume, and removeSee the documentation for usage details:
$ claude mcp add asyncz \
-- python -m otcore.mcp_server <graph>