Show HN:FastScheduler – 支援異步的裝飾器優先 Python 工作排程器
這篇 Hacker News 的「Show HN」貼文介紹了 FastScheduler,一個採用裝飾器優先方法的 Python 工作排程器,並內建支援異步操作、cron 表達式、間隔任務和即時儀表板。
Navigation Menu
Search code, repositories, users, issues, pull requests...
Provide feedback
We read every piece of feedback, and take your input very seriously.
Saved searches
Use saved searches to filter your results more quickly
To see all available qualifiers, see our documentation.
Decorator-first Python scheduler — cron/interval/at jobs with simple persistence and built-in run history.
License
Uh oh!
There was an error while loading. Please reload this page.
MichielMe/fastscheduler
Folders and files
Latest commit
History
Repository files navigation
FastScheduler
Simple, lightweight task scheduler for Python with async support, timezone handling, cron expressions, and a beautiful real-time dashboard.
If this saves you time, ⭐️ the repo and open an issue for ideas — I'm actively improving it.

Features
Installation
Quick Start
Scheduling Options
Interval-based
Time-based
Cron Expressions
Requires: pip install fastscheduler[cron]
One-time Jobs
Timezone Support
Schedule jobs in any timezone:
Common timezones: UTC, America/New_York, America/Los_Angeles, Europe/London, Europe/Paris, Asia/Tokyo, Asia/Shanghai, Australia/Sydney
Job Control
Timeouts
Kill jobs that run too long:
Retries
Configure automatic retries on failure:
Retries use exponential backoff (2s, 4s, 8s, 16s, ...).
Skip Catch-up
Don't run missed jobs after restart:
Pause, Resume, and Cancel
FastAPI Integration
Add a beautiful real-time dashboard to your FastAPI app:
Dashboard Features
Access at http://localhost:8000/scheduler/

API Endpoints
Configuration
History Retention
History is automatically cleaned up based on two limits (both are enforced):
Set history_retention_days=0 to disable time-based cleanup (only count limit applies).
Dead Letter Queue
Failed job executions are automatically stored in a separate dead letter queue for debugging:
The dead letter queue:
Monitoring
Programmatic Access
Context Manager
State Persistence
FastScheduler automatically saves state to disk:
On restart, it:
Examples
Complete Example
FastAPI with Lifespan
API Reference
FastScheduler
Scheduler Methods
Chainable Modifiers
License
MIT
Contributing
Contributions welcome! Please open an issue or PR on GitHub.
About
Decorator-first Python scheduler — cron/interval/at jobs with simple persistence and built-in run history.
Topics
Resources
License
Uh oh!
There was an error while loading. Please reload this page.
Stars
Watchers
Forks
Languages
Footer
Footer navigation
相關文章