Scheduled Tasks on Vercel Functions

Vercel Cron Jobs bring serverless scheduling to Vercel Functions, allowing developers to run tasks at defined intervals without managing infrastructure. The feature supports common automation scenarios like syncing third-party APIs, health monitoring, backups, and collecting metrics for reporting.

The simplest setup is a vercel.json configuration file. With it, any framework can schedule a function using a standard cron expression.

vercel.json

{

"crons": [

{

"path": "/api/send-slack-notification",

"schedule": "*/10 * * * *"

},

{

"path": "/api/daily-backup",

"schedule": "0 2 * * * *"

},

{

"path": "/api/hourly-onboarding-emails",

"schedule": "0 * * * *"

}

]

}

Useful entry points include the official documentation and a ready-to-deploy example template with crons.

How Cron Expressions Work

Vercel's scheduler uses the standard five-field cron syntax to define when a task triggers. Each field controls a different schedule unit and supports lists, ranges, and the wildcard * to match every value.

# ┌───────────── minute (0 - 59)

# │ ┌───────────── hour (0 - 23)

# │ │ ┌───────────── day of the month (1 - 31)

# │ │ │ ┌───────────── month (1 - 12)

# │ │ │ │ ┌───────────── day of the week (0 - 6) (0 is Sunday, 6 is Saturday)

# │ │ │ │ │

# │ │ │ │ │

# │ │ │ │ │

# * * * * *

Some common examples:

  • 0 * * * *: run at the top of every hour
  • 30 2 * * *: run daily at 2:30 AM
  • 0 0 1 * *: run at midnight on the first of each month
  • 0 0 * * 0: run at midnight every Sunday

Framework-Agnostic Scheduling

The initial roll-out works on any framework through vercel.json; no native integration is required. Framework authors can expose first-party cron support by targeting the Build Output API, which is the specification Vercel uses to expose platform features.

Native cron integration for Next.js and SvelteKit is under exploration. That work would bring ergonomic configuration, better TypeScript inference, and in-editor validation for cron expressions.

Usage Limits and Pricing

During beta, the three plans come with the following limits:

  • Hobby: 2 cron jobs total, run up to once per day each
  • Pro: 40 cron jobs total, unlimited runs per day
  • Enterprise: 100 cron jobs, unlimited runs per day

Maximum execution duration matches existing Serverless and Edge Functions limits.

Cron jobs are currently free on all teams while the service remains in beta; however, they will become a paid feature when it reaches general availability.

References for edge-case behavior are available in the documentation, covering job duration, retry policies, securing handlers, dynamic route support, 404 responses, behavior on new deployments, and concurrency limits.