Skip to content
Docs

Testing Schedules Locally

vercel dev runs a local scheduler, so you can test schedules and your handlers without deploying. Local schedules never touch your production schedules.

Run the development server from your project directory:

terminal
vercel dev

vercel dev starts a local Schedules service and then:

  • Loads the static schedules from vercel.json and your framework's build output, and reloads them when the configuration changes
  • Configures @vercel/schedules in your app to use the local service, so SDK calls create and change local dynamic schedules
  • Delivers runs to your local functions, routes, and queue consumers with the same headers and message format as production
  • Applies the same validation rules, error codes, jitter, and late-run expiry as production

Local schedules run on their cadence while vercel dev is running. If your machine sleeps, occurrences that expired in the meantime are skipped when it wakes, as they would be in production.

Path targets receive the same headers as in production, including user-agent: vercel-cron/1.0 and x-vercel-cron-schedule. They also receive Authorization: Bearer <CRON_SECRET> when CRON_SECRET is set in your development environment.

To choose the port for the local Schedules service, pass --schedules-port:

terminal
vercel dev --schedules-port 5784

You don't need to wait for a schedule's next run. In a second terminal, invoke it with --local:

terminal
vercel schedules invoke cleanup --local

The run appears in the vercel dev output.

Pass --local to vercel schedules to manage the schedules in the running vercel dev session instead of production:

terminal
vercel schedules list --local
vercel schedules create send-reminder --at 2026-11-01T09:00 --topic reminders --local
vercel schedules disable cleanup --local
vercel schedules enable cleanup --for 1h --local

--local connects to the session for the current project directory. Use --cwd to choose another directory. Local commands don't need a login or a linked project.

vercel schedules with --local:

  • Works with list, inspect, create, update, enable, disable, invoke, and delete
  • Fails if no vercel dev session is running, or if it can't tell which session to use. It never falls back to production.
  • Can't be combined with --environment, --git-branch, --user, --scope, --team, or --token
BehaviorLocalProduction
Schedule stateExists only for the current vercel dev sessionPersists
Execution historyRead the vercel dev output. vercel schedules executions list doesn't support --local.Dashboard and CLI
Function targets in a serviceNot supported. vercel dev fails with DEV_SCHEDULE_SERVICE_FUNCTION_UNSUPPORTED. Deploy to test them.Supported
Hobby jitter and team schedule limitsNot enforcedEnforced

Locally, you can't create a one-time schedule for a time that a daylight saving time change skips or repeats in the schedule's timezone. Choose a different time.


Was this helpful?

supported.