cron-jobs — Codex skill: what it does, how to install
Configures and debugs scheduled Vercel Cron Jobs in vercel.json. Helpful when setting up serverless endpoints that run on a timer.
npx skills add openai/plugins --skill cron-jobs -a codexWhat cron-jobs does
This skill guides the agent through defining entries in the crons array inside vercel.json. It enforces pointing each path to a serverless API route and using standard five-field cron expressions.
It includes code patterns to verify incoming requests by matching the Authorization header against CRON_SECRET. The instructions also track platform boundaries: 2 jobs running once a day on the Hobby tier, and up to 40 jobs at one-minute intervals on Pro. Crons execute only on production deployments, never on previews.
Install this if you deploy recurring tasks on Vercel and want to avoid syntax mistakes or unprotected endpoints.
What it helps with
- configure crons array in vercel.json
- verify CRON_SECRET headers on scheduled API routes
- select cron schedules matching Hobby or Pro tier limits
- debug production invocations with vercel logs --follow
Example prompts for the agent
- Add a daily digest cron job at 8:00 AM UTC to vercel.json
- Create a Next.js cron route that validates CRON_SECRET
- Set up a cron schedule that runs every 5 minutes on Pro
How to install cron-jobs
1Skills CLI (Vercel)
npx skills add openai/plugins --skill cron-jobs -a codex2Manually: put the files in place
.agents/skills/cron-jobs/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add openai/plugins --skill cron-jobs -a claude-code2Manually: put the files in place
~/.claude/skills/cron-jobs/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/cron-jobs/
Manually: put the files in place
.cursor/skills/cron-jobs/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install openai/plugins cron-jobs2Manually: put the files in place
.github/skills/cron-jobs/SKILL.mdPlatform CLI
gemini skills install https://github.com/openai/plugins --path plugins/vercel/skills/cron-jobsManually: put the files in place
.devin/skills/cron-jobs/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
From the same set201
The whole set →Similar
Questions about cron-jobs
How to install cron-jobs in Codex?
Run npx skills add openai/plugins --skill cron-jobs -a codex. The definition will be placed in .agents/skills/cron-jobs/SKILL.md.
What does cron-jobs do?
It instructs the agent on proper Vercel Cron Jobs syntax, security verification, and plan constraints in vercel.json.
Do cron jobs run on preview deployments?
No. Vercel executes scheduled tasks only on production deployments, ignoring preview environments.
Source text
SKILL.md · Apache-2.0
---
name: cron-jobs
description: Vercel Cron Jobs configuration and best practices. Use when adding, editing, or debugging scheduled tasks in vercel.json.
metadata:
priority: 6
docs:
- "https://vercel.com/docs/cron-jobs"
sitemap: "https://vercel.com/sitemap/docs.xml"
pathPatterns:
- 'vercel.json'
- 'apps/*/vercel.json'
bashPatterns: []
---
# Vercel Cron Jobs
You are an expert in Vercel Cron Jobs — scheduled serverless function invocations configured in `vercel.json`.
## Configuration
Cron jobs are defined in the `crons` array of `vercel.json`:
```json
{
"crons": [
{
"path": "/api/cron/daily-digest",
"schedule": "0 8 * * *"
}
]
}
```
## Key Rules
1. **Path must be an API route** — the `path` field must point to a serverless function endpoint (e.g., `/api/cron/...`)
2. **Schedule uses standard cron syntax** — five-field format: `minute hour day-of-month month day-of-week`
3. **Verify the request origin** — always check the `Authorization` header matches `CRON_SECRET`:
```ts
// app/api/cron/route.ts
export async function GET(request: Request) {
const authHeader = request.headers.get("authorization");
if (authHeader !== `Bearer ${process.env.CRON_SECRET}`) {
return new Response("Unauthorized", { status: 401 });
}
// ... your scheduled logic
return Response.json({ ok: true });
}
```
4. **Hobby plan limits** — max 2 cron jobs, minimum interval of once per day
5. **Pro plan** — up to 40 cron jobs, minimum interval of once per minute
6. **Max duration** — cron-triggered functions follow normal function duration limits
## Common Patterns
- **Daily digest**: `"0 8 * * *"` (8:00 AM UTC daily)
- **Every hour**: `"0 * * * *"`
- **Every 5 minutes** (Pro): `"*/5 * * * *"`
- **Weekdays only**: `"0 9 * * 1-5"`
## Debugging
- Check deployment logs for cron execution results
- Use `vercel logs --follow` to watch cron invocations in real time
- Cron jobs only run on production deployments, not preview deployments
## References
- [Cron Jobs documentation](https://vercel.com/docs/cron-jobs)
© Vercel Labs · Apache-2.0 · openai/plugins