Convex Crons

by get-convex2cfe645c87f9No license63 starsListed Oct 8, 2026Updated Oct 8, 2026Repository updated 6 days ago

Add recurring scheduled jobs (crons) to the Convex app.

AI-generated overview

Adds recurring scheduled jobs (crons) to a Convex app by defining cron jobs that target internal functions.

What it does
Guides the agent through creating a convex/crons.ts file with cronJobs() and scheduling internal functions at suitable intervals. It emphasizes idempotent, small handlers and verifying that the job appears in the dashboard schedule. It produces configuration instructions rather than scripts.
When to use it
Use when a Convex application needs recurring background work, such as periodic maintenance or cleanup tasks. It fits situations where scheduled jobs should call internal functions instead of public API endpoints.
Requirements
A Convex project with the Convex tooling and dashboard access. No scripts are shipped; the skill is instructions only.
<!-- GENERATED from convex-agents content/capabilities/crons.json — do not edit by hand. -->

Add scheduled jobs (crons)

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

Workflow

  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/agent-skillsinskills/convex-cronsat commit2cfe645

License: No license

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

Report or request removal