vercel crons
The vercel crons command manages Cron Jobs for your project. Use it to add cron entries to vercel.json, list configured crons, and trigger a cron job to run immediately for testing.
vercel crons [subcommand]Using the vercel crons command to manage cron jobs for the current project.
When called without a subcommand, vercel crons runs list.
Adds a cron job to your project's vercel.json. When called without flags, the command prompts for the path and schedule.
vercel crons add
vercel crons add --path /api/cron --schedule "0 10 * * *"Add a cron job. Provide --path and --schedule to skip the interactive
prompts.
| Option | Type | Description |
|---|---|---|
--path <PATH> | String | API route path for the cron job (must start with /) |
--schedule <EXPRESSION> | String | Cron schedule expression (for example, "0 10 * * *") |
Lists all cron jobs configured for the current project. This is the default subcommand.
vercel crons
vercel crons list
vercel crons list --json--json for machine-readable output.| Option | Type | Description |
|---|---|---|
--json | Boolean | Output as JSON |
-p, --project <NAME_OR_ID> | String | Project name or ID to list cron jobs for (defaults to the linked project) |
Triggers a cron job that is already deployed to production. Useful for testing a cron handler without waiting for the schedule. The command reads cron definitions from your deployed project, not from your local vercel.json, so you must vercel deploy --prod (or otherwise deploy vercel.json with the cron) before vercel crons run can find it.
vercel crons run /api/cron| Argument | Required | Description |
|---|---|---|
path | No | API route path of the cron job to trigger (defaults to interactive selection when omitted) |
| Option | Type | Description |
|---|---|---|
-p, --project <NAME_OR_ID> | String | Name or ID of the project that has the cron job (defaults to the linked project) |
vercel crons add --path /api/cron/daily --schedule "0 9 * * *"Add a job that runs /api/cron/daily every day at 09:00 UTC.
vercel crons list --jsonUseful for diffing cron configuration against an external schedule registry.
vercel crons run /api/cron/dailyTrigger the configured handler without waiting for the schedule. Useful for iterating on cron logic during development.
The following global options can be passed when using the vercel crons command:
For more information on global options and their usage, refer to the options section.
Was this helpful?