Help Center/Admin Operations/Price Engine: set up the scheduled refresh (cron secret)
Admin Operations•Last updated: 2026-10-19•5 min read

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?

Ask AI Copilot

Step-by-Step Procedure

1

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.

2

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.

3

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.

4

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.

Expected Operational Outcome

Prices refresh on schedule and the status badge shows SECRET CONFIGURED.

Troubleshooting & Failure Modes

Symptom: The scheduler gets 401
Likely Cause: CRON_SECRET is unset, shorter than 16 characters, or different from the one in the Bearer header.
Resolution: Set the same value in both places.

Was this guide helpful?

Help us refine our platform documentation

Related Ecosystem Documentation