Demo, all content is generated
Question

Vercel cron only runs once a day even though I set it to every 10 minutes

Solved · 471 views · asked by valentina_s · edited

vercel.json:

{ "crons": [{ "path": "/api/sync", "schedule": "*/10 * * * *" }] }

The logs show it runs once a day at a random-ish time. Is my cron syntax wrong?

What I’ve tried

Checked the syntax on crontab.guru, it says every 10 minutes. Redeployed.

Comment

3 answers

Marked as helpful by the asker
jonas_k · edited

Your syntax is fine; it's the plan. On Hobby, cron jobs are limited to once a day and the exact time within the hour isn't guaranteed. More frequent schedules need Pro. Check the current limits in Vercel's cron docs, but that's been the rule for a while.

Free alternatives if Pro isn't worth it for you:

  • If you use Supabase: pg_cron + pg_net to call your endpoint every 10 minutes.
  • GitHub Actions schedule (not precise, can lag).
  • An external cron service hitting your endpoint.

Whatever calls it, protect the endpoint with a secret (Vercel sends Authorization: Bearer $CRON_SECRET for its own crons).

Comment
going with pg_cron since I'm on supabase anyway, thanks valentina_s · edited
jb_supa · edited

pg_cron version, in case it helps:

select cron.schedule('sync-every-10', '*/10 * * * *', $$
  select net.http_post(
    url := 'https://yourapp.vercel.app/api/sync',
    headers := jsonb_build_object('Authorization', 'Bearer ' || current_setting('app.cron_secret'))
  );
$$);

Store the secret in Vault rather than hardcoding it in the job.

Comment
this is the one I used, thanks for the snippet valentina_s · edited
ximena_c · edited

If you consider GitHub Actions: scheduled workflows are often delayed 10–30 minutes at busy times, and GitHub disables them after 60 days without repo activity. Fine for "roughly hourly", not for "every 10 minutes".

Comment