INNER CODE UNIT · Python
FastScheduler
MichielMe/fastscheduler · src/fastscheduler/main.py:42
class FastScheduler:
"""
FastScheduler - Simple, powerful, persistent task scheduler with async support.
Args:
state_file: Path to the JSON file for persisting scheduler state (used with JSON backend)
storage: Storage backend - "json" (default), "sqlmodel", or a StorageBackend instance
database_url: Database URL for SQLModel backend (e.g., "sqlite:///scheduler.db",
"postgresql://user:pass@host/db", "mysql://user:pass@host/db")
auto_start: If True, start the scheduler immediately
quiet: If True, suppress most log messages
max_history: Maximum number of history entries to keep (default: 10000)
max_workers: Maximum number of worker threads for job execution (default: 10)
history_retention_days: Maximum age of history entries in days (default: 7)
max_dead_letters: Maximum number of failed job entries to keep in dead letter queue (default: 500)
Examples:
# JSON storage (default, backward compatible)