Reference
Cron Jobs
Scheduled background jobs on Vercel.
Recurex runs two cron jobs configured in vercel.json. Both require authentication.
Authentication
Authorization: Bearer {CRON_SECRET}
Alternatively: ?secret={CRON_SECRET}
Reminders + FX refresh
GET /api/cron/reminders
| Property | Value |
|---|---|
| Schedule | Daily at 08:00 UTC (0 8 * * *) |
| Max duration | 60 seconds |
What it does
- Select active expenses with
reminder_enabled = trueandnext_dueset - Filter orgs with
reminders:emailplan feature - Resolve org owner →
reminder_emailandtimezone - Roll forward stale
next_duedates for recurring bills - Send reminder digest emails for items in the lead window
- Log sends in
reminders_log(idempotent per expense + due date) - Piggyback daily FX rate refresh (
refreshFxRates)
Response
{
"ok": true,
"candidates": 12,
"nextDueAdvanced": 3,
"digestsSent": 2,
"remindersSent": 5,
"fxRefreshed": true,
"errors": []
}Provider sync
GET /api/cron/provider-sync
| Property | Value |
|---|---|
| Schedule | 2nd of month at 06:00 UTC (0 6 2 * *) |
| Max duration | 60 seconds |
What it does
- Compute previous calendar month period (
YYYY-MM-01) - Load all
provider_links - Skip orgs without
bills:variablefeature - Run
runProviderSync()per link - Collect per-link errors (best-effort)
Response
{
"ok": true,
"period": "2026-05-01",
"links": 8,
"synced": 7,
"errors": []
}Manual triggering
For local testing:
curl -H "Authorization: Bearer $CRON_SECRET" \
https://recurex.app/api/cron/reminders