How to Install APScheduler in Python

v3.11.2 General Purpose Python >=3.8 MIT

In-process task scheduler with Cron-like capabilities

Install pip install APScheduler

What is APScheduler?

In-process task scheduler with Cron-like capabilities

Advanced Python Scheduler (APScheduler) is a Python library that lets you schedule your Python code to be executed later, either just once or periodically. You can add new jobs or remove old ones on the fly as you please. If you store your jobs in a database, they will also survive scheduler restarts and maintain their state. When the scheduler is restarted, it will then run all the jobs it should have run while it was offline [#f1].

Among other things, APScheduler can be used as a cross-platform, application specific replacement to platform specific schedulers, such as the cron daemon or the Windows task scheduler. Please note, however, that APScheduler is not a daemon or service itself, nor does it come with any command line tools. It is primarily meant to be run inside existing applications. That said, APScheduler does provide some building blocks for you to build a scheduler service or to run a dedicated scheduler process.

APScheduler has three built-in scheduling systems you can use:

Quick Start

Minimal example to get started with APScheduler:

from apscheduler.schedulers.blocking import BlockingScheduler

scheduler = BlockingScheduler()

@scheduler.scheduled_job("interval", seconds=10)
def job():
    print("Running every 10 seconds")

scheduler.start()

Installation

pip (standard)

pip install APScheduler

Virtual environment (recommended)

python -m venv venv
source venv/bin/activate   # Windows: venv\Scripts\activate
pip install APScheduler

pip3

pip3 install APScheduler

conda

conda install -c conda-forge APScheduler

Poetry

poetry add APScheduler

Dependencies

Installing APScheduler will also install these packages:

Verify the Installation

After installing, confirm the package is available:

python -c "import apscheduler; print(apscheduler.__version__)"

If this prints a version number, installation succeeded. If you see a ModuleNotFoundError, see the errors section below.

Installation Errors

Common errors when installing APScheduler with pip.

ModuleNotFoundError: No module named 'apscheduler'

Cause: The package is not installed in the current Python environment.

Fix: Run pip install APScheduler. If using a virtual environment, ensure it is activated first.

ModuleNotFoundError: No module named 'apscheduler' (installed but still failing)

Cause: pip installed the package into a different Python than the one running your script.

Fix: Use python -m pip install APScheduler to install into the interpreter you are running.

ImportError: cannot import name 'X' from 'apscheduler'

Cause: The function or class does not exist in the installed version.

Fix: Check the version with pip show APScheduler and upgrade with pip install --upgrade APScheduler.

pip: command not found

Cause: pip is not in PATH or Python was not added to PATH during installation.

Fix: Try python -m pip install APScheduler. On macOS/Linux try pip3.

PermissionError: [Errno 13] Permission denied

Cause: No write access to the system Python package directory.

Fix: Use a virtual environment, or add --user: pip install --user APScheduler

SSL: CERTIFICATE_VERIFY_FAILED

Cause: pip cannot verify PyPI's SSL certificate — common behind corporate proxies.

Fix: Try: pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org APScheduler

Runtime Errors

Common errors when using APScheduler after installation.

apscheduler.jobstores.base.JobLookupError

Cause: Attempting to modify or remove a job ID that does not exist.

Fix: List current jobs with scheduler.get_jobs(). Check the job ID is correct.

apscheduler.jobstores.base.ConflictingIdError

Cause: A job with that ID is already registered.

Fix: Use a unique job ID, or pass replace_existing=True when adding the job.

Recent Releases

VersionReleased
3.11.2 latest 2025-12-22
3.11.1 2025-10-31
4.0.0a6 2025-04-27
3.11.0 2024-11-24
4.0.0a5 2024-05-15

Full release history on PyPI →

Manage APScheduler

Upgrade to latest version

pip install --upgrade APScheduler

Install a specific version

pip install APScheduler==3.11.2

Uninstall

pip uninstall APScheduler

Check what is installed

pip show APScheduler

Last updated: 2026-04-11 • Data from PyPI