vercel crons
The vercel crons command (alias vercel cron) 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 ls
vercel crons ls --format json--format json for machine-readable output.| Option | Type | Description |
|---|---|---|
-F, --format <FORMAT> | String | Output format (json) |
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) |
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 ls --format 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:
--cwd--debug--global-config--help--local-config--no-color--non-interactive--scope--team--token--version
For more information on global options and their usage, refer to the options section.
Was this helpful?