If you use Supabase mode,
npm run db:push already sets up pg_cron with this same schedule.What your scheduler should call
- Method:
GET - Header:
Authorization: Bearer <CRON_SECRET> - Base URL:
SITE_URL - Endpoints:
/api/sync/events/api/sync/event-creations/api/sync/resolution/api/sync/translations/api/sync/volume
Recommended cron schedule
| Endpoint | Cron schedule | Notes |
|---|---|---|
/api/sync/events | 2,11,20,29,38,47,56 * * * * | Seven times per hour, spaced to reduce overlap |
/api/sync/event-creations | 0,30 * * * * | Twice per hour |
/api/sync/resolution | 5-55/10 * * * * | Every 10 minutes, offset by 5 minutes |
/api/sync/volume | 16,46 * * * * | Twice per hour |
/api/sync/translations | 13,37 * * * * | Twice per hour |
Expected responses
200: accepted or completed401: missing or invalidCRON_SECRET409: sync already running, which can happen on locked routes500: runtime failure that should be investigated in logs