
β° Tired of Celery for simple tasks? FastScheduler solves it in one line.
FastScheduler is a lightweight Python scheduler with a decorator-based API, native async support, cron expressions, and a real-time dashboard. Install with: pip install fastscheduler.
π― Scheduling in one line:
from fastscheduler import FastScheduler
scheduler = FastScheduler(quiet=True)
@scheduler.every(10).seconds
def heartbeat():
print("ping")
@scheduler.daily.at("09:00", tz="America/New_York")
async def morning_report():
await send_report()
@scheduler.cron("*/15 * * * *")
def check_api():
ping_health_endpoint()
scheduler.start()π Everything included:
| Feature | Detail |
|---|---|
| β‘ Native async | async def works with zero extra config |
| π Timezones | Any timezone with .tz("America/New_York") |
| π Cron expressions | Complex schedules with standard syntax |
| π Auto retries | Exponential backoff (2s, 4s, 8s…) |
| β±οΈ Timeouts | Kill jobs that run too long |
| πΎ Persistent state | Survives restarts, handles missed jobs |
| π¬ Dead Letter Queue | Failed job history with full error details |
π₯οΈ Built-in FastAPI dashboard:
from fastscheduler.fastapi_integration import create_scheduler_routes
app.include_router(create_scheduler_routes(scheduler))
# Dashboard at: http://localhost:8000/scheduler/π Explanation in a nutshell
A “scheduler” is a program that automatically runs tasks at specific times β like an alarm clock for your code. For example: “run this function every day at 9 AM” or “check the API every 15 minutes.” FastScheduler does this in Python by simply adding @scheduler.every(10).seconds above any function, with no extra servers to configure.
More information at the link π
Also published on LinkedIn.
