mirror of
https://github.com/leonvanzyl/autocoder.git
synced 2026-01-30 06:12:06 +00:00
Add comprehensive scheduling system that allows agents to automatically
start and stop during configured time windows, helping users manage
Claude API token limits by running agents during off-hours.
Backend Changes:
- Add Schedule and ScheduleOverride database models for persistent storage
- Implement APScheduler-based SchedulerService with UTC timezone support
- Add schedule CRUD API endpoints (/api/projects/{name}/schedules)
- Add manual override tracking to prevent unwanted auto-start/stop
- Integrate scheduler lifecycle with FastAPI startup/shutdown
- Fix timezone bug: explicitly set timezone=timezone.utc on CronTrigger
to ensure correct UTC scheduling (critical fix)
Frontend Changes:
- Add ScheduleModal component for creating and managing schedules
- Add clock button and schedule status display to AgentControl
- Add timezone utilities for converting between UTC and local time
- Add React Query hooks for schedule data fetching
- Fix 204 No Content handling in fetchJSON for delete operations
- Invalidate nextRun cache when manually stopping agent during window
- Add TypeScript type annotations to Terminal component callbacks
Features:
- Multiple overlapping schedules per project supported
- Auto-start at scheduled time via APScheduler cron jobs
- Auto-stop after configured duration
- Manual start/stop creates persistent overrides in database
- Crash recovery with exponential backoff (max 3 retries)
- Server restart preserves schedules and active overrides
- Times displayed in user's local timezone, stored as UTC
- Immediate start if schedule created during active window
Dependencies:
- Add APScheduler for reliable cron-like scheduling
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
17 lines
306 B
Plaintext
17 lines
306 B
Plaintext
claude-agent-sdk>=0.1.0,<0.2.0
|
|
python-dotenv>=1.0.0
|
|
sqlalchemy>=2.0.0
|
|
fastapi>=0.115.0
|
|
uvicorn[standard]>=0.32.0
|
|
websockets>=13.0
|
|
python-multipart>=0.0.17
|
|
psutil>=6.0.0
|
|
aiofiles>=24.0.0
|
|
apscheduler>=3.10.0
|
|
pywinpty>=2.0.0; sys_platform == "win32"
|
|
|
|
# Dev dependencies
|
|
ruff>=0.8.0
|
|
mypy>=1.13.0
|
|
pytest>=8.0.0
|