360 Secure SkillHub
360 安全技能中心

convex-crons

指导在 Convex 项目中创建 convex/crons.ts,使用 cronJobs 调度 internal 函数,设置合理间隔并保证处理幂等,最后在仪表盘确认任务,避免调度 api 函数或使用过密轮询。

convex
热度 0.00
最近更新 2026-10-18 16:51:28
分类:开发依赖:读写文件应用场景:代码生成 / 自动化脚本

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add convex/agent-skills/convex-crons
Metadata
name
convex-crons
description
Add recurring scheduled jobs (crons) to the Convex app.

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.