convex-cron-jobs

Schedule Convex functions with interval and cron expressions.

78|18|Updated Feb 20, 2025
One-click install
npx skills add https://github.com/nakafaai/nakafa.com --skill convex-cron-jobs-nakafaai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: convex-cron-jobs
Source: https://github.com/nakafaai/nakafa.com/tree/main/.agents/skills/convex-cron-jobs
Command: npx skills add https://github.com/nakafaai/nakafa.com --skill convex-cron-jobs-nakafaai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Convex cron jobs simplify and accelerate the automation of recurring backend tasks by providing structured patterns for scheduling functions in Convex applications, reducing manual intervention and scheduling errors.

Core Features & Use Cases

  • Interval-based scheduling supports running tasks at fixed intervals (e.g., every 15 minutes, hourly, daily).
  • Cron expression support enables precise timing for complex workflows (e.g., nightly reports, weekly maintenance).
  • Best-practice guidance emphasizes using internal functions for security, idempotency, retries, and monitoring.
  • Use cases include data synchronization, cleanup jobs, and routine analytics in Convex apps.

Quick Start

Create a cron configuration (convex/crons.ts) using cronJobs and wire it to internal actions or mutations; then run the development server to test locally with pnpm dev.

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 recurring background jobs in Convex?

Schedule recurring background jobs in Convex by creating a cron configuration file using cronJobs, wiring internal actions or mutations to a fixed timetable for automated data syncing and cleanup tasks.

What is the difference between interval and cron scheduling in Convex?

Interval scheduling runs tasks at fixed frequencies like every 15 minutes, while cron expression scheduling enables precise timing for complex workflows such as nightly reports and weekly maintenance routines.

How do I secure scheduled functions in Convex cron jobs?

Secure scheduled functions in Convex cron jobs by using internal functions, which prevents external API calls from directly triggering sensitive backend mutations and actions.

Does Convex support error handling and retries for cron jobs?

Yes, Convex supports error handling and retries for cron jobs, providing best-practice patterns for idempotency and monitoring to ensure routine analytics and background tasks execute reliably.

Can I test Convex cron jobs locally before deploying?

Test Convex cron jobs locally by defining the crons.ts configuration file and running the development server with pnpm dev to verify scheduled tasks trigger correctly.

How do I handle batching and monitoring for daily reports in Convex?

Handle batching and monitoring for daily reports in Convex by implementing structured scheduling patterns that support data synchronization, cleanup jobs, and routine analytics processing.