Documentation Index
Fetch the complete documentation index at: https://mintlify.com/KingPsychopath/oooc-fete-finder/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Cron job endpoints are scheduled tasks that run automatically at specified intervals. These endpoints handle maintenance operations like cleaning up expired sessions, rate limits, and creating backups.All cron endpoints are secured with the
CRON_SECRET environment variable and are automatically invoked by Vercel’s cron scheduler.Authentication
All cron endpoints require Bearer token authentication:Bearer token containing the
CRON_SECRET value.Format: Bearer YOUR_CRON_SECRETVercel automatically sends this header when invoking scheduled cron jobs.Endpoints
Cleanup admin sessions
Deletes expired admin session records that are older than 7 days. Path:/api/cron/cleanup-admin-sessions
Method: GET
Schedule: Daily at 4:00 AM UTC (0 4 * * *)
Indicates whether the cleanup was successful.
Number of expired admin sessions deleted.
app/api/cron/cleanup-admin-sessions/route.ts:9
Cleanup rate limits
Deletes stale authentication verification rate limit counters. Path:/api/cron/cleanup-rate-limits
Method: GET
Schedule: Daily at 4:10 AM UTC (10 4 * * *)
Indicates whether the cleanup was successful.
Number of rate limit records deleted.
app/api/cron/cleanup-rate-limits/route.ts:9
Backup event store
Creates periodic backups of the event store CSV payload. Path:/api/cron/backup-event-store
Method: GET
Schedule: Daily at 4:20 AM UTC (20 4 * * *)
Indicates whether the backup operation completed successfully.
Human-readable description of the result.
Backup metadata (only present when backup was created).
Number of old backups that were deleted to maintain retention limits.
Indicates the backup was skipped (e.g., no data available).
app/api/cron/backup-event-store/route.ts:9
Error responses
All cron endpoints use a consistent error response format:Error message describing what went wrong.
Always
false for 500 errors.Status codes
| Code | Description |
|---|---|
| 200 | Operation completed successfully |
| 401 | Missing or invalid CRON_SECRET |
| 500 | Internal server error during execution |
Cron schedule configuration
Cron jobs are configured invercel.json:
vercel.json
Schedule format uses standard cron syntax:
minute hour day month weekdayAll times are in UTC.Environment variables
Secret token used to authenticate cron job requests.Set this in your Vercel project environment variables. Vercel automatically includes it in the
Authorization header when invoking scheduled crons.Implementation details
All cron endpoints follow a consistent pattern:- Extract Bearer token from
Authorizationheader - Validate token against
CRON_SECRETenvironment variable - Execute the scheduled task (cleanup, backup, etc.)
- Return operation results with appropriate status codes
- Set no-cache headers to prevent response caching