---
title: "Vercel Cron Job Example"
description: "A Next.js app that uses Vercel Cron Jobs to update data at different intervals."
url: "https://vercel.com/templates/next.js/vercel-cron"
links:
  repository: "https://github.com/vercel/examples/tree/main/solutions/cron"
  demo: "https://cron-template.vercel.app/"
  deploy: "https://vercel.com/new/clone?demo-title=Vercel+Cron+Job+Example&demo-description=A+Next.js+app+that+uses+Vercel+Cron+Jobs+to+update+data+at+different+intervals.&demo-url=https%3A%2F%2Fcron-template.vercel.app%2F&demo-image=%2F%2Fimages.ctfassets.net%2Fe5382hct74si%2F4Zitw3SHFxmAilD78IdAMo%2F096c168a4bf28900e5c7aac4834261cc%2FCleanShot_2023-02-22_at_13.39.24.png&project-name=Vercel+Cron+Job+Example&repository-name=vercel-cron&repository-url=https%3A%2F%2Fgithub.com%2Fvercel%2Fexamples%2Ftree%2Fmain%2Fsolutions%2Fcron&from=templates&skippable-integrations=1&products=%5B%7B%22type%22%3A%22integration%22%2C%22group%22%3A%22redis%22%7D%5D"
---

# Vercel Cron Job Example

A Next.js app that uses Vercel Cron Jobs to update data at different intervals.

# Vercel Cron Job Example

A Next.js app that uses [Vercel Cron Jobs](https://vercel.com/docs/cron-jobs) to update data at different intervals.

## Demo

https://cron-template.vercel.app/

## How to Use

You can choose from one of the following two methods to use this repository:

### One-Click Deploy

Deploy the example using [Vercel](https://vercel.com?utm_source=github&utm_medium=readme&utm_campaign=examples-repo):

[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fvercel%2Fexamples%2Ftree%2Fmain%2Fsolutions%2Fcron&project-name=cron&repository-name=cron&demo-title=Vercel%20Cron%20Job%20Example&demo-description=A%20Next.js%20app%20that%20uses%20Vercel%20Cron%20Jobs%20to%20update%20data%20at%20different%20intervals.&demo-url=https%3A%2F%2Fcron-template.vercel.app%2F&demo-image=https%3A%2F%2Fcron-template.vercel.app%2Fthumbnail.png&stores=%5B%7B"type"%3A"kv"%7D%5D)

Don't forget to set the required environment variables that you got from the previous step.

### Clone and Deploy

Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [pnpm](https://pnpm.io/installation) to bootstrap the example:

```bash
pnpm create next-app --example https://github.com/vercel/examples/tree/main/solutions/cron cron
```

Next, run Next.js in development mode:

```bash
pnpm dev
```

Deploy it to the cloud with [Vercel](https://vercel.com/new?utm_source=github&utm_medium=readme&utm_campaign=examples-repo) ([Documentation](https://nextjs.org/docs/deployment)).

## Related Templates

### [Cron OG Cards](https://vercel.com/templates/next.js/cron-og)

A template for scheduled updates to your OG social cards using Vercel Cron Jobs and Upstash Redis.

---

## Additional documentation

The [Vercel Knowledge Base](https://vercel.com/kb) contains guides and answers to common questions about Vercel, including deployment, framework configuration, domains, caching, and troubleshooting.
