Registry / workflow / scheduler

scheduler

JSON →
library0.8.11pypypi✓ verified 84d ago

A simple in-process Python scheduler library with asyncio, threading, and timezone support. Current version 0.8.11 supports Python >=3.10. Released as needed.

pip install scheduler
INSTALL
IMPORT
SIG · SCHEDULER
S
scheduler
workflowpythonv0.8.11
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Scheduler
from scheduler import Scheduler
from scheduler.scheduler import Scheduler
Top-level import only; submodule import breaks compatibility.
AsyncIOScheduler
from scheduler.asyncio import Scheduler as AsyncIOScheduler
from scheduler import AsyncIOScheduler
Async scheduler lives in a submodule import asyncio.Scheduler
ThreadingScheduler
from scheduler.threading import Scheduler as ThreadingScheduler
from scheduler import ThreadingScheduler
Threading scheduler lives in a submodule import threading.Scheduler

Basic usage: create a Scheduler, schedule a cyclic task, then repeatedly call exec_jobs() in a loop.

from scheduler import Scheduler import time scheduler = Scheduler() def my_task(): print("Task executed") # Schedule every 5 seconds scheduler.cyclic(5, my_task) # Run for 10 seconds start = time.time() while time.time() - start < 10: scheduler.exec_jobs() time.sleep(0.1)
Debug
Known issues
gotchaThe library requires manual calling of exec_jobs() in a loop; it does not run automatically. Failing to call exec_jobs() in a loop will result in no tasks executing.
fix
Run scheduler.exec_jobs() inside a while loop or use the provided async/threading wrappers.
affects: all
gotchaTiming changes between exec_jobs() calls are skipped if the next execution time is in the past. Tasks are not caught up; they wait for the next scheduled time.
fix
Ensure exec_jobs() is called frequently enough to avoid missing scheduled times, or adjust for missed executions manually.
affects: all
deprecatedThe method 'schedule' was renamed to 'cyclic' in version 0.8.0. Using 'schedule' raises AttributeError.
fix
Use scheduler.cyclic(interval, job) instead of scheduler.schedule(interval, job).
affects: >=0.8.0
breakingSupport for Python <3.10 dropped in version 0.8.0. Installing on older Python versions will fail.
fix
Upgrade to Python >=3.10 or pin to scheduler==0.7.3.
affects: >=0.8.0
Errors
Common errors & fixes
AttributeError: module 'scheduler' has no attribute 'Scheduler'
Importing the wrong path (e.g., from scheduler.scheduler import Scheduler) in older versions or using a stale installation.
fix
Use 'from scheduler import Scheduler' (top-level).
AttributeError: 'Scheduler' object has no attribute 'schedule'
Calling the old method name 'schedule' which was renamed to 'cyclic' in v0.8.0.
fix
Replace 'scheduler.schedule(interval, job)' with 'scheduler.cyclic(interval, job)'.
ImportError: cannot import name 'AsyncIOScheduler' from 'scheduler'
Trying to import the async scheduler directly from the top-level package, but it is in a submodule.
fix
Use 'from scheduler.asyncio import Scheduler as AsyncIOScheduler'.
Upgrade
Version history
0.8.11latest on PyPI · released Feb 15, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
34 hits · last 30 days
node
30
OpenAI (training)
1
Resources
scheduler — pip install scheduler · libregistry