convex-cron-jobs

Schedule recurring Convex functions using interval and cron expression patterns.

1|Updated Feb 19, 2026
One-click install
npx skills add https://github.com/kausthubh-coder/kriyan-web --skill convex-cron-jobs-kausthubh-coder
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: convex-cron-jobs
Source: https://github.com/kausthubh-coder/kriyan-web/tree/main/.cursor/skills/convex-cron-jobs
Command: npx skills add https://github.com/kausthubh-coder/kriyan-web --skill convex-cron-jobs-kausthubh-coder

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Automating recurring background work in Convex applications—such as cleanup jobs, data syncing, and scheduled reports—requires correct cron configuration, internal function security, and failure handling that developers often get wrong. ## Core Features & Use Cases - Interval and Cron Scheduling: Configure recurring jobs with crons.interval for fixed periods or crons.cron for precise cron expressions in UTC. - Secure Internal Functions: Route all cron-triggered work through internal mutations and actions, including external API calls via Node actions. - Batching and Monitoring: Process large datasets in paginated batches with self-scheduling continuation, and log job execution metrics to a cronLogs table. - Use Case: Build a maintenance system that deletes expired sessions hourly, syncs external data every 15 minutes, and generates a weekly analytics report every Monday at 9 AM UTC. ## Quick Start Set up a Convex cron job that runs an internal cleanup mutation every hour and logs its execution results.

Frequently Asked Questions about convex-cron-jobs

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I schedule a cron job in Convex?▼

Create a convex/crons.ts file, call cronJobs() from convex/server, then register jobs with crons.interval for fixed periods or crons.cron for cron expressions. Each job references an internal function and optional static arguments.

How to run a Convex function every day at a specific time?▼

Use crons.cron with a cron expression like "0 9 * * *" to run daily at 9 AM. All cron expressions in Convex are interpreted in UTC, so convert your local target time accordingly.

Can Convex cron jobs call public functions?▼

Cron jobs should call internal functions only, not public ones. Define the work as an internalMutation or internalAction and reference it through the internal object imported from _generated/api.

How do I handle large datasets in a Convex cron job?▼

Process records in batches using paginate with a cursor, then schedule the next batch with ctx.scheduler.runAfter passing the continueCursor. This prevents long-running mutations from timing out.

Can Convex cron jobs call external APIs?▼

Yes, but external calls must run in an internalAction with the "use node" directive, since mutations cannot make network requests. Fetch the data in the action, then persist it via ctx.runMutation.

What timezone do Convex cron expressions use?▼

Convex cron expressions always use UTC. A common pitfall is writing expressions in local time, so convert your desired schedule to UTC before registering the job.