# Getting started with cron jobs

This guide will help you get started with using cron jobs on Vercel. Cron jobs are scheduled tasks that run at specific times or intervals. They are useful for automating tasks. You will learn how to create a cron job that runs every day at 5 am UTC by creating a Vercel Function and configuring it in your `vercel.json` file.

## Prerequisites

- [A Vercel account](/content/signup/index.html)
- [A project](/content/docs/projects#creating-a-project/index.html) with a [Vercel Function](/content/docs/functions/index.html)

1. ### Create a function

This function contains the code that will be executed by the cron job. This example uses a simple function that returns the user's region.

```typescript
export function GET(request: Request) {
     return new Response('Hello from Vercel!');
}
```

2. ### Create or update your `vercel.json` file

Create or go to your [`vercel.json`](/content/docs/project-configuration/vercel-json#functions/index.html) file and add the following code:

```json
{
     "$schema": "https://openapi.vercel.sh/vercel.json",
     "crons": [
       {
         "path": "/api/hello",
         "schedule": "0 5 * * *"
       }
     ]
}
```

The `crons` property is an array of cron jobs. Each cron job has two properties:

- The `path`, which must start with `/`
- The `schedule` property, which must be a string that represents a [cron expression](/content/docs/cron-jobs#cron-expressions/index.html). In this example, the job is scheduled to execute every day at 5:00 am UTC.

3. ### Deploy your project.

When you deploy your project, Vercel's build process creates the cron job. Vercel invokes cron jobs only for [production](/content/docs/deployments/environments#production-environment/index.html) deployments and not for [preview](/content/docs/deployments/environments#preview-environment-pre-production/index.html) deployments.

You can also deploy to your production domain using the CLI:

```bash
vercel deploy --prod
```

Your cron job is now active and will call the `/api/hello` path every day at 5:00 am UTC.

## Next steps

Now that you have created a cron job, you can learn more about how to manage and configure them:

- [Learn about managing cron jobs](/content/docs/cron-jobs/manage-cron-jobs/index.html)
- [Explore usage and pricing](/content/docs/cron-jobs/usage-and-pricing/index.html)

Last updated August 11, 2026.
