convex-crons
Adds recurring scheduled jobs (crons) to a Convex app by defining cronJobs() in convex/crons.ts that target internal functions. It enforces internal-only targets, sane intervals, and idempotent handlers while steering you toward subscriptions instead of tight polling, so background jobs deploy correctly and re-run safely.
npx skills add https://github.com/convex/agent-skills --skill convex-cronsBefore / After Comparison
1 组Developers hunt through docs, guess at intervals, and point scheduled jobs at public endpoints, only to find after deploy that jobs never ran, fired twice, or hammered the database at a too-tight interval.
This Skill provides the standard shape for the cron config file and internal-function scheduling rules, with idempotent handlers and sane intervals, so jobs deploy correctly the first time and re-run safely.
Add scheduled jobs (crons)
Define recurring jobs in convex/crons.ts targeting internal functions, with sane intervals and idempotent handlers.
Workflow
- Create convex/crons.ts with cronJobs().
- Schedule internal functions (never public api.*) at the right interval.
- Make handlers idempotent (safe to re-run); keep each run small.
- Verify the job appears in the dashboard schedule.
Rules
- Schedule internal.* functions, never api.*.
- Keep cron handlers small + idempotent.
- Don't poll tight intervals for things a subscription can push.
User Reviews (0)
Write a Review
No reviews yet
Statistics
User Rating
Rate this Skill