Files
Momento/memento-note/prisma/schema.prisma
sepehr 73de1cd26d
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 1m9s
feat: implement agent scheduled execution with cron and time picker
- Add scheduledTime, scheduledDay, timezone fields to Agent schema
- Create calculateNextRun() helper with timezone-aware scheduling
- Add POST /api/cron/agents endpoint for external scheduler
- Calculate nextRun on agent create, update, and after execution
- Add time/day picker in agent form (daily/weekly/monthly)
- Show "Next run" countdown in agent card
- Add i18n keys for schedule UI (FR + EN)

External scheduler (N8N, Vercel Cron) should call /api/cron/agents
every 5-15 min. Requires `prisma db push` to apply schema changes.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-26 10:45:48 +02:00

13 KiB