Files
portainer-core/services/scheduler/requirements.txt
T
jpmschweitzerandClaude Sonnet 4.5 455d16ce8f feat(scheduler): implement core scheduler service
Add hybrid APScheduler + PostgreSQL-based task scheduling system with minute-based execution and priority queue.

Core features:
- Minute-based scheduling with cron-like patterns (-1 = wildcard)
- Priority queue system (1-100, lower = higher priority)
- Concurrent execution (max 5 tasks simultaneously)
- Full REST API for task management (CRUD operations)
- Task execution tracking with audit trail
- API key authentication (Bearer token)
- Health checks and system statistics

Architecture:
- APScheduler runs every minute
- Queries PostgreSQL for tasks scheduled for current minute
- Executes tasks concurrently by priority
- Records execution history in database

Database schema:
- scheduled_tasks: Task definitions/templates
- task_executions: Individual execution records

Technical stack:
- FastAPI for REST API
- APScheduler for scheduling
- PostgreSQL for persistence
- Pydantic for configuration

Endpoints:
- POST/GET/PUT/DELETE /tasks - Task management
- POST /tasks/{name}/trigger - Manual execution
- GET /executions - Execution history
- GET /health - Health check
- GET /stats - System statistics

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-07 23:12:28 +01:00

35 lines
1.2 KiB
Plaintext

# FastAPI ecosystem - Latest CVE-safe versions (Dec 2025)
fastapi~=0.124.0 # Latest non-vulnerable (no known CVEs)
uvicorn[standard]~=0.38.0 # Latest non-vulnerable (CVE-2025-43859 fixed in h11 0.16.0)
pydantic~=2.12.5 # Latest (CVE-2024-3772 fixed in 2.4.0+)
pydantic-settings~=2.7.0 # Settings management
# Task scheduling
apscheduler~=3.11.1 # Stable release (avoid 4.x alpha)
sqlalchemy~=2.0.36 # Required by APScheduler jobstore
# Database
psycopg2-binary~=2.9.11 # Latest stable PostgreSQL adapter
redis~=5.2.0 # Redis client
# HTTP client
httpx~=0.28.1 # Latest stable async HTTP client
# Web scraping (for doc mirroring)
scrapy~=2.12.0 # Latest stable
beautifulsoup4~=4.12.3 # HTML parsing
lxml~=5.1.0 # XML/HTML parser
# Git operations
gitpython~=3.1.43 # Latest stable
# Security/Auth
python-jose[cryptography]~=3.3.0 # JWT handling
# Testing
pytest~=8.3.4 # Test framework
pytest-asyncio~=0.25.2 # Async test support
pytest-cov~=6.0.0 # Coverage reporting
httpx~=0.28.1 # Already included above, used for API testing
freezegun~=1.5.1 # Time mocking for scheduler tests