Repolode
agronholm

agronholm/apscheduler

Python task scheduler and task queue library supporting cron, interval, calendar and one-off triggers, with optional persistent job stores.

Stars
7,688
Forks
823
Open issues
82
Last commit
11 days ago

What is it?

APScheduler (Advanced Python Scheduler) is a library for running Python functions on a schedule or as queued jobs. It works in a single process for small scripts and can also span multiple nodes, where several schedulers and workers share a common data store.

It provides both synchronous and asynchronous flavors, so it fits thread-based applications as well as asyncio or Trio applications. Schedules and jobs can be persisted to PostgreSQL, MySQL, SQLite or MongoDB, so they survive restarts and can be shared across instances. PostgreSQL, Redis and MQTT serve as event brokers when multiple schedulers or workers need to coordinate.

Built-in triggers cover cron-style, fixed-interval, calendar-based (every X years, months, weeks or days at the same time of day) and one-off runs. Triggers can be combined, custom triggers can be written, and jobs can be limited in concurrency, allowed lateness and random jitter.

Key features

  • 01Cron, interval, calendar-based and one-off triggers, plus custom triggers
  • 02Persistent job stores for PostgreSQL, MySQL, SQLite and MongoDB
  • 03Event brokers for PostgreSQL, Redis and MQTT across multiple schedulers and workers
  • 04Both synchronous and asynchronous (asyncio, Trio) APIs
  • 05Concurrency limits, late-start limits and jitter for jobs

Use cases

  • Running periodic background jobs inside a Python web application
  • Scheduling recurring data sync or cleanup tasks across several servers with a shared database
  • Using it as a lightweight job queue when no separate task queue is needed
  • Triggering asyncio or Trio tasks from an ASGI or WSGI application

Things to know

  • The v4.0 series is a pre-release and may change incompatibly without a migration path, so it should not be used in production.

Topics

FAQ

What is apscheduler?
Python task scheduler and task queue library supporting cron, interval, calendar and one-off triggers, with optional persistent job stores. APScheduler (Advanced Python Scheduler) is a library for running Python functions on a schedule or as queued jobs. It works in a single process for small scripts and can also span multiple nodes, where several schedulers and workers share a common data store.
Is apscheduler free to use? What license does it have?
apscheduler is open source under the MIT license. Check the license terms before using it in commercial products.
Is apscheduler still maintained?
Actively maintained. The last commit to apscheduler was on Oct 26, 2026.
What can I use apscheduler for?
Running periodic background jobs inside a Python web application Scheduling recurring data sync or cleanup tasks across several servers with a shared database Using it as a lightweight job queue when no separate task queue is needed Triggering asyncio or Trio tasks from an ASGI or WSGI application
Where can I get apscheduler?
The source code and installation instructions are on GitHub: https://github.com/agronholm/apscheduler

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects