What problem does it solve?
Setting up recurring background tasks in a Convex backend requires knowing the correct conventions: where to define crons, which functions are safe to schedule, and how to keep handlers reliable. This Skill provides the exact workflow and rules for adding scheduled jobs to a Convex app without misconfiguring public endpoints or creating fragile handlers.
Core Features & Use Cases
- Cron Definition Workflow: Guides creation of convex/crons.ts using the cronJobs() API to register recurring jobs.
- Safe Scheduling Rules: Enforces scheduling internal.* functions only, never public api.* endpoints, and choosing sane intervals.
- Idempotent Handler Guidance: Ensures each cron run is small and safe to re-run, avoiding duplicate side effects.
- Use Case: You need a nightly cleanup job that purges expired sessions in your Convex app. Follow the workflow to create convex/crons.ts, schedule an internal mutation at a daily interval, and verify it appears in the dashboard schedule.
Quick Start
Add a daily cron job to my Convex app that calls an internal function to clean up expired sessions.