Skip to main content
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
Example:
curl -sS -X GET \
  -H "Authorization: Bearer ${CRON_SECRET}" \
  "${SITE_URL}/api/sync/events"
EndpointCron scheduleNotes
/api/sync/events2,11,20,29,38,47,56 * * * *Seven times per hour, spaced to reduce overlap
/api/sync/event-creations0,30 * * * *Twice per hour
/api/sync/resolution5-55/10 * * * *Every 10 minutes, offset by 5 minutes
/api/sync/volume16,46 * * * *Twice per hour
/api/sync/translations13,37 * * * *Twice per hour
Use UTC unless your team needs a strict local timezone.

Expected responses

  • 200: accepted or completed
  • 401: missing or invalid CRON_SECRET
  • 409: sync already running, which can happen on locked routes
  • 500: runtime failure that should be investigated in logs
Do not run duplicate schedulers at the same time. Use either pg_cron or your external cron jobs.