Vercel · infra · fg-0247

Vercel cron job shows no log and does nothing because the route answers with a redirect

If you see No runtime log for the cron path at the scheduled time, the cause and the fix for Vercel are below, last verified 2026-10-15.

Verified Oct 2026trust 50/100
Symptom
No runtime log for the cron path at the scheduled timeHitting the path in a browser works because the browser follows the redirectMiddleware that redirects unauthenticated requests to /login also catches the cron call
Cause
Vercel calls the production deployment with a plain GET and treats any 3xx as the final answer, and redirected or cached cron responses are hidden from the logs. Trailing slash rewrites, auth middleware, or locale redirects on the cron path make the job silently finish without running.
Fix
Exclude the cron path from middleware redirects, use the exact path the router serves, and authenticate the call with the CRON_SECRET bearer header instead of a session check.
Apply
// middleware.ts export const config = { matcher: ['/((?!api/cron).*)'] }; // app/api/cron/route.ts export function GET(req: Request) { if (req.headers.get('authorization') !== `Bearer ${process.env.CRON_SECRET}`) return new Response('Unauthorized', { status: 401 }); return Response.json({ ok: true }); }
Affected
Vercel Cron Jobs on all plans, production deployments only, as of October 2026
Sources

Last verified 2026-10-15 · Confirmed by 0 builders

Related traps

Have your agent know this before it fails

$ /plugin marketplace add getfootgun/footgun
$ /plugin install footgun@footgun