This site is not affiliated with or endorsed by Vercel, Inc. Read the docs, then deploy or run each experiment yourself.
Platform

Cron Sitemap Rebuild

Vercel Cron regenerates sitemap.xml from a content list backed by Neon, Blob, or memory.

Run this experiment yourself

Demos are not embedded on this site. Deploy a standalone copy on Vercel or run the experiment app locally.

Local development

cd apps/experiments/cron-sitemap-rebuild
pnpm install
pnpm dev

Then open http://localhost:3010.

This is an experimental demo. Use it as a starting point for your own projects.

Cron job rebuilds sitemap.xml from a content URL list with Neon/Blob/memory persistence.

Features

  • Standalone Next.js app under apps/experiments/cron-sitemap-rebuild/.
  • Honest degradation when optional services are missing.
  • Unit-tested helpers in logic.ts.

API Reference

GET|POST /api/cron/sitemap · GET /sitemap.xml

Cron Authorization bearer when CRON_SECRET set

Implementation Details

Run the demo

Use the embedded playground or pnpm dev in the experiment app.

Inspect the handlers

Copy Route Handlers from apps/experiments/cron-sitemap-rebuild/ into your project.

Limitations

  • Educational demo — not a production-hardened product.
  • Inputs are length-capped.

Use in your project

Copy the experiment folder or individual Route Handlers.

Deployment

Deploy on Vercel

Local Development

cd apps/experiments/cron-sitemap-rebuild
pnpm install
pnpm dev

Configuration

VariableRequiredPurpose
CRON_SECRETYesLab configuration

Vercel / Next.js Features Used

  • Vercel Cron, Neon, Vercel Blob, Upstash Redis

Next Steps

On this page