
Cron Jobs
Configure and debug Vercel Cron Jobs in vercel.json so scheduled work hits serverless routes instead of fragile in-process timers.
Install
npx skills add https://github.com/vercel-labs/vercel-plugin --skill cron-jobsWhat is this skill?
- Vercel Cron Jobs configuration and best practices tied to official Vercel cron-jobs documentation
- Path-pattern retrieval for vercel.json including monorepo `apps/*/vercel.json` layouts
- chains to vercel-functions when node-cron/cron packages are detected—native scheduling needs no npm cron library
- chains to workflow when handlers use setInterval, polling, or infinite loops that need durable execution
- Self-chain guidance when cron-parser, croner, or node-schedule appears—prefer vercel.json native scheduling
Adoption & trust: 54 installs on skills.sh; 187 GitHub stars; 3/3 security scanners passed (skills.sh audits).
Recommended Skills
Journey fit
Canonical shelf is ship/launch because cron definitions ship with deployment config and gate reliable go-live behavior for recurring maintenance tasks. Launch subphase covers vercel.json scheduling, cron expressions, and pre-production validation of timed routes before traffic depends on them.
Common Questions / FAQ
Is Cron Jobs safe to install?
skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.
SKILL.md
READMESKILL.md - Cron Jobs
# Vercel Cron Jobs You are an expert in Vercel Cron Jobs — scheduled serverless function invocations configured in `vercel.json`. ## Configuration Cron jobs are defined in the `crons` array of `vercel.json`: ```json { "crons": [ { "path": "/api/cron/daily-digest", "schedule": "0 8 * * *" } ] } ``` ## Key Rules 1. **Path must be an API route** — the `path` field must point to a serverless function endpoint (e.g., `/api/cron/...`) 2. **Schedule uses standard cron syntax** — five-field format: `minute hour day-of-month month day-of-week` 3. **Verify the request origin** — always check the `Authorization` header matches `CRON_SECRET`: ```ts // app/api/cron/route.ts export async function GET(request: Request) { const authHeader = request.headers.get("authorization"); if (authHeader !== `Bearer ${process.env.CRON_SECRET}`) { return new Response("Unauthorized", { status: 401 }); } // ... your scheduled logic return Response.json({ ok: true }); } ``` 4. **Hobby plan limits** — max 2 cron jobs, minimum interval of once per day 5. **Pro plan** — up to 40 cron jobs, minimum interval of once per minute 6. **Max duration** — cron-triggered functions follow normal function duration limits ## Common Patterns - **Daily digest**: `"0 8 * * *"` (8:00 AM UTC daily) - **Every hour**: `"0 * * * *"` - **Every 5 minutes** (Pro): `"*/5 * * * *"` - **Weekdays only**: `"0 9 * * 1-5"` ## Debugging - Check deployment logs for cron execution results - Use `vercel logs --follow` to watch cron invocations in real time - Cron jobs only run on production deployments, not preview deployments ## References - [Cron Jobs documentation](https://vercel.com/docs/cron-jobs)