Skip to main content
Schedule a Convex function to run later — once after a delay, or recurring on a cron schedule. See Convex scheduled functions for the full reference; this page is the orientation.

Two patterns

One-shot delayed

ctx.scheduler.runAfter(60_000, api.foo.bar, args) — runs once, after 60 seconds.

Recurring (cron)

crons.cron("0 0 * * *", api.foo.dailyCleanup, args) — runs daily at midnight UTC.

Common uses

Reminder emails

“Send a reminder 24 hours before the booking” — schedule from the booking creation mutation.

Cleanup jobs

Delete soft-deleted rows after 30 days; clear old presence records hourly.

Nightly reports

Aggregate yesterday’s data into a dailyMetrics table for fast dashboard queries.

Renewals

“Mark subscription as ‘renewing’ 24 hours before period end.”

Tips

For complex workflows, use Inngest or Trigger.dev. Scheduled functions are great for simple one-shots; orchestrators are better for multi-step jobs with retries.
All cron schedules are UTC. If you want “midnight in user’s timezone”, store the timezone on the user and pick a daily action that processes per-user.

Convex scheduled functions

Full reference.

Background jobs

For longer / chunked work.

Inngest

For complex workflows.
Last modified on April 18, 2026