Crons

by get-convex6ca54f6e2e75No licenseListed Oct 8, 2026Updated Oct 8, 2026

Set up recurring scheduled jobs (crons) on Convex — digests, cleanups, polling, retries. TRIGGER when the user wants a recurring/scheduled task ('every day/hour', cron, periodic cleanup). Targets internal functions, idempotent handlers.

AI-generated overview

Sets up recurring scheduled jobs (crons) on Convex targeting internal functions with idempotent handlers.

What it does
This skill guides the creation of recurring scheduled jobs on Convex by defining them in a convex/crons.ts file using cronJobs(). It instructs scheduling internal functions rather than public api.* functions at appropriate intervals, and making handlers idempotent and small. It also covers verifying that a job appears in the dashboard schedule.
When to use it
Use it when a user wants a recurring or scheduled task on Convex, such as daily or hourly digests, periodic cleanups, polling, or retries. It applies when the request mentions cron, periodic cleanup, or an 'every day/hour' style schedule.
Requirements
Convex project context; no scripts are shipped, instructions only.

Add scheduled jobs (crons)

Define recurring jobs in convex/crons.ts targeting internal functions, with sane intervals and idempotent handlers.

Steps

  1. Create convex/crons.ts with cronJobs().
  2. Schedule internal functions (never public api.*) at the right interval.
  3. Make handlers idempotent (safe to re-run); keep each run small.
  4. 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.

Source and attribution

Source:get-convex/convex-backend-skillinskills/cronsat commit6ca54f6

License: No license

Content belongs to its original authors. SourceWeft indexes it from a public repository.

Report or request removal