cron-jobs

Vercel Cron Jobs configuration and best practices. Use when adding, editing, or debugging scheduled tasks in vercel.json.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "cron-jobs" with this command: npx skills add vercel-labs/vercel-plugin/vercel-labs-vercel-plugin-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:

{
  "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:
// 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 });
}
  1. Hobby plan limits — max 2 cron jobs, minimum interval of once per day
  2. Pro plan — up to 40 cron jobs, minimum interval of once per minute
  3. 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

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

shadcn

No summary provided by upstream source.

Repository SourceNeeds Review
General

turborepo

No summary provided by upstream source.

Repository SourceNeeds Review
General

ai-elements

No summary provided by upstream source.

Repository SourceNeeds Review
General

turbopack

No summary provided by upstream source.

Repository SourceNeeds Review