convex-cron-jobs

Schedule recurring Convex functions using interval or cron expressions.

Updated Feb 9, 2025
One-click install
npx skills add https://github.com/obada-jaras/nextboost-starter --skill convex-cron-jobs-obada-jaras
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: convex-cron-jobs
Source: https://github.com/obada-jaras/nextboost-starter/tree/main/.cursor/skills/convex-cron-jobs
Command: npx skills add https://github.com/obada-jaras/nextboost-starter --skill convex-cron-jobs-obada-jaras

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill automates recurring background tasks within your Convex application, ensuring essential operations run on schedule without manual intervention.

Core Features & Use Cases

  • Scheduled Execution: Run functions at fixed intervals or specific times using cron expressions.
  • Background Processing: Ideal for data synchronization, cleanup jobs, report generation, and automated workflows.
  • Use Case: Automatically generate a daily sales report every night at midnight UTC by scheduling a Convex function.

Quick Start

Configure a cron job to run the internal.tasks.cleanupExpiredSessions function every hour.

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 tasks in Convex?

To schedule recurring background tasks in Convex, you define your cron jobs using interval-based or cron expressions within the `convex/crons.ts` file. This configuration automates operations like data syncing and report generation without manual intervention.

What is the best way to automate daily report generation in a serverless application?

Automating daily report generation in a serverless application is best handled by scheduling internal functions with cron expressions. This ensures specific operations run automatically at designated times, such as generating a sales report at midnight UTC.

Does Convex support cron expression scheduling for background jobs?

Yes, Convex supports cron expression scheduling for background jobs. You can configure internal functions to execute at specific times or fixed intervals by defining the schedule in the `convex/crons.ts` file for automated workflows.

Can I run cleanup jobs automatically at fixed intervals in Convex?

You can run cleanup jobs automatically at fixed intervals in Convex by configuring interval-based scheduling. Defining these recurring internal functions in `convex/crons.ts` allows background processing to handle tasks like cleaning up expired sessions.

How do I configure a cron job to execute internal Convex functions?

To configure a cron job for executing internal Convex functions, you define the schedule and target function within the `convex/crons.ts` file. This setup allows the system to automatically trigger operations like data synchronization at specified intervals.

What are the limitations of using cron jobs for background processing in Convex?

The limitations of using cron jobs for background processing in Convex relate to their reliance on defining schedules in `convex/crons.ts` and calling internal functions. They are suited for repetitive tasks but require specific configuration for execution.