Menu
Urgent
React2Shell security update

Managing Cron Jobs

Last updated September 24, 2025

Cron Jobs are available on all plans

To view your active cron jobs:

  1. Select your project from the Vercel dashboard
  2. Select the Settings tab
  3. Select the Cron Jobs tab from the left sidebar
  • Updating Cron Jobs: Change the expression in file or the function's configuration, and then redeploy
  • Deleting Cron Jobs: Remove the configuration from the file or the function's configuration, and then redeploy
  • Disabling Cron Jobs: Navigate to the Cron Jobs tab and then click the Disable Cron Jobs button

Disabled cron jobs will still be listed and will count towards your cron jobs limits

It is possible to secure your cron job invocations by adding an environment variable called to your Vercel project. We recommend using a random string of at least 16 characters for the value of . A password generator, like 1Password, can be used to create one.

The value of the variable will be automatically sent as an header when Vercel invokes your cron job. Your endpoint can then compare both values, the authorization header and the environment variable, to verify the authenticity of the request.

You can use App Router Route Handlers to secure your cron jobs, even when using the Pages Router.

The header will have the prefix for the value.

The duration limits for Cron jobs are identical to those of Vercel Functions. See the documentation for more information.

In most cases, these limits are sufficient. However, if you need more processing time, it's recommended to split your cron jobs into different units or distribute your workload by combining cron jobs with regular HTTP requests with your API.

Vercel will not retry an invocation if a cron job fails. You can check for error logs through the View Log button in the Cron Jobs tab.

Cron jobs can be created for dynamic routes:

If you create a cron job for a path that doesn't exist, it generates a 404 error. However, Vercel still executes your cron job. You can analyze your logs to check if there are any issues.

Creating a new deployment will not interrupt your running cron jobs; they will continue until they finish.

If your cron job runs longer than the interval between invocations, Vercel can trigger a second instance while the first is still running. This can lead to race conditions, duplicate processing, or data corruption.

To prevent concurrent runs, use a lock mechanism like Redis distributed locks in your cron job. A lock ensures only one instance runs at a time by checking if another instance is already active before starting.

You can also prevent overlapping runs by:

  • Reducing execution time: Optimize your job to finish before the next invocation
  • Setting timeouts: Use to force long-running jobs to stop
  • Increasing the interval: Run your cron job less frequently

Vercel's event-driven system can occasionally deliver the same cron event more than once. This means your job might run twice for a single scheduled execution.

Design your operations to be idempotent so they produce the same result even when executed multiple times. For example:

  • Good: "Set user status to active" (running twice has the same effect)
  • Bad: "Increment user credit by 10" (running twice doubles the credit)

To make operations idempotent:

  • Use unique IDs to track which events you've already processed
  • Check state before making changes (e.g., "if not already active, then activate")
  • Store results with timestamps or version numbers

Use both locks (to prevent concurrent runs) and idempotency (to handle duplicate events safely) together for the most reliable cron jobs

Cron jobs are API routes. You can run them locally by making a request to their endpoint. For example, if your cron job is in , you could visit the following endpoint in your browser: . You should be aware that while your browser may follow redirects, cron job invocations in production will not follow redirects.

There is currently no support for , , or other framework-native local development servers.

Cron jobs do not follow redirects. When a cron-triggered endpoint returns a 3xx redirect status code, the job completes without further requests. Redirect responses are treated as final for each invocation.

The view logs button on the cron job overview can be used to verify the response of the invocations and gain further insights.

Cron jobs are logged as function invocations from the Logs tab of your projects dashboard. You can view the logs for a cron job from the list on the Cron jobs settings page of the project:

  1. From the list of cron jobs, select View Logs.
  2. This will take you to the runtime logs view with a filter to your cron job such as .

See how to view runtime logs for more information.

Note that when cron jobs respond with a redirect or a cached response, they will not be shown in the logs.

Hobby users can only create cron jobs with hourly accuracy. Vercel may invoke these cron jobs at any point within the specified hour to help distribute load across all accounts. For example, an expression like could trigger an invocation anytime between and .

For all other teams, cron jobs will be invoked within the minute specified. For instance, the expression would trigger an invocation between and .

If you Instant Rollback to a previous deployment, active cron jobs will not be updated. They will continue to run as scheduled until they are manually disabled or updated.


Was this helpful?

supported.