Price Engine: set up the scheduled refresh (cron secret)
Keep prices current without anyone opening a page by calling the cron endpoint with a secret.
Have questions or need step-by-step guidance on this topic?
Step-by-Step Procedure
Check the status
On /admin/prices choose the "Cron and I8I connection" tab. SECRET NOT SET or SECRET TOO WEAK means the endpoint refuses every call. The secret itself is never displayed.
Set the secret
In the hosting environment set CRON_SECRET to a long random value (at least 16 characters, 32 or more recommended) and redeploy. Never put it in code or share it in chat.
Schedule the call
From a scheduler call GET or POST /api/v1/cron/prices/refresh with the header Authorization: Bearer <CRON_SECRET>. On Vercel, add a cron entry for that path; Vercel sends the Bearer header automatically when CRON_SECRET is set. Per-minute schedules need a paid Vercel plan; the free plan allows one run per day, so use an external scheduler (for example GitHub Actions or a monitoring pinger) for a faster rhythm.
Verify
Wait for one run, then check "Last refresh" on the Overview tab; it says "by system:cron". A call with a missing or wrong secret returns 401.
Prices refresh on schedule and the status badge shows SECRET CONFIGURED.
Troubleshooting & Failure Modes
Was this guide helpful?
Help us refine our platform documentation