
⏰ 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.
