Example code demonstrating Chronis usage.
In-memory scheduler with interval and cron jobs.
python examples/quickstart.pyMulti-tenant job scheduling with metadata filtering.
python examples/multitenant.pyDead Letter Queue (DLQ) pattern using failure handlers.
Demonstrates how to:
- Capture failed jobs with full error context
- Store failed jobs in DLQ (in-memory example, easily adaptable to PostgreSQL/Redis)
- Query and retry failed jobs
- Track DLQ statistics
python examples/dead_letter_queue.pyExecution history tracking using success/failure handlers.
Demonstrates how to:
- Log all job executions (success and failure)
- Query execution history with filters
- Generate execution statistics
- Monitor success rates
python examples/execution_history.pyRedis-based storage and distributed locking.
cd examples/redis
docker-compose up -d
python redis_example.pySee redis/README.md for details.
PostgreSQL storage with JSONB schema.
cd examples/postgres
docker-compose up -d
python postgres_example.pySee postgres/README.md for details.
# Install with dependencies
pip install chronis[all]
# Or install from source
pip install -e ".[all]"