APScheduler
In-process task scheduler with Cron-like capabilities for Python applications.
3. Used by agents' projects
Dependency in 48 public GitHub projects set up for AI coding agents that we scanned (0.8%).
4. Agent access
Agent skills for this library in the skills catalog; community skills are written by others, read them before you install.
From the package registry and GitHub, checked daily. Tap a verdict to see its source.How we checkedReport an error
What APScheduler does
APScheduler is both a scheduler and a task queue, in sync and async flavors, and it can share one data store across many schedulers and workers. The README that describes all this covers a v4 pre-release that it says not to use in production.
APScheduler popularity
Gid Score measures public popularity and activity, not quality. How the Gid Score is calculated
How APScheduler is used
- APScheduler is a dependency in 48 of the 6,258 public GitHub projects set up for AI coding agents that we scanned (3.0% of the 1,623 Python ones), #1 of 48 in jobs, queues and workflows.
- Counting the projects our scan samples by dependency (Solana 3,067, Ethereum and EVM 1,774, 3D and games 3,130, agent frameworks and SDKs 13,750), it appears in 327; those are left out of every share on this page.
- The most used alternative in our scan is Celery (37 projects).
- Projects that use it most often also use Uvicorn (75.0%), python-dotenv (68.8%), FastAPI (62.5%).
- It is more common in projects set up for OpenClaw (5.1%) than for GitHub Copilot (0.4%).
By coding agent
Often used with
APScheduler in practice
Strengths
The README says the library can serve as a job queue on its own when you have no use for time-based scheduling.
It ships synchronous and asynchronous flavors. The README says it fits thread-based apps and asyncio or Trio apps, and it includes docs for WSGI and ASGI web apps.
Schedules and jobs can be kept in PostgreSQL, MySQL and derivatives, SQLite or MongoDB. They then survive process and node restarts and can be shared between instances.
Multiple schedulers and workers can point at a shared data store. The maintainers say this gives "a degree of high availability and horizontal scaling."
Watch out for
The README warns that the v4.0 series may break backwards compatibility with no migration path. It says in capitals not to use it in production.
The README describes v4 features such as data stores and event brokers. The latest published release is 3.11.3. Check which line the docs you are reading belong to.
Before 3.11.3, sub-minute interval jobs could stall through a DST spring-forward gap when the scheduler used a <code>ZoneInfo</code> time zone.
More about APScheduler
Packages around it
- python-dotenv: .env file loading
- requests: HTTP client
- pydantic: data validation
- fastapi: web API framework
- uvicorn: ASGI server
- solders: solders
More in Jobs, queues and workflows
Alternatives
APScheduler This page
Distributed task queue for Python executing jobs asynchronously across workers.
Cron expression parser and iterator for Python, schedule tasks with cron-like timing.
Simple Python library for scheduling jobs to run at regular intervals.
Small task queue for Python with Redis or SQLite.
Get started
Install it.
pip install apschedulerRules for your agent
## APScheduler
- Do not use the v4.0 series in production. The README marks it as a pre-release that may break compatibility without a migration path.
- When reading the README or docs, check whether they describe v4 or the 3.x line (latest release 3.11.3).
- If schedules must survive restarts or be shared between instances, configure a persistent data store: PostgreSQL, MySQL, SQLite or MongoDB.
- With more than one scheduler or worker, also configure an event broker: PostgreSQL, Redis or MQTT.
- Pick the synchronous flavor for thread-based apps and the asynchronous flavor for asyncio or Trio apps.
- Use the built-in limits on simultaneous jobs per function and on how late a job may start, instead of writing your own guards.
- If you run sub-minute interval jobs with a `ZoneInfo` time zone, use 3.11.3 or later to avoid the DST spring-forward stall.