kb-cron-jobs

Generates Cron jobs and manages them centrally for .NET projects.

Updated May 19, 2026
One-click install
npx skills add https://github.com/TimeKast/AgendaInteligente --skill kb-cron-jobs
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: kb-cron-jobs
Source: https://github.com/TimeKast/AgendaInteligente/tree/main/.claude/skills/kb-cron-jobs
Command: npx skills add https://github.com/TimeKast/AgendaInteligente --skill kb-cron-jobs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

kb-cron-jobs solves the recurring issue of cron drift, brittle Vercel configuration, silent failures, and inconsistent operational behavior in Next.js projects by providing a single, portable end-to-end pattern for declaring, validating, running, and monitoring cron jobs.

Core Features & Use Cases

  • SSOT job registry for crons: Define jobs once (id, path, schedule, handler, runtime knobs like maxDuration, retry, notification policy) and derive everything else from that registry.
  • Autogenerated vercel.json with drift defense: Generate deterministic cron entries from the registry and validate that the on-disk vercel.json matches (fail on manual edits).
  • Pre-commit linter with actionable guardrails: Validate id format, route existence, handler export naming, cron format, orphans, maxDuration drift, and Vercel JSON shape via a vendored schema/supplemental allowlist.
  • Secure cron runtime contract: Enforce CRON_SECRET Authorization, require force-dynamic, and align handler time budgets with the registry.
  • Operational run tracking + structured logging: Persist job runs to a DB table and emit both structured logs and auditable run history.
  • Resilience and observability patterns: Implement runWithRetry, stale-log cleanup, consolidated watchdog meta-cron for misses/failures, and idempotency contracts.
  • Admin-controlled execution: Provide manual “run now” invocation from an admin UI that uses the same handler as scheduled crons, plus on/off toggles via DB flags (not registry removal).
  • Portability beyond Vercel: Keep the registry portable while swapping the generator for other platforms (Render, Railway, self-hosted queues).

Quick Start

Use the kb-cron-jobs skill to add your first cron by creating a single registry entry in src/config/cron-jobs.ts, generating vercel.json from it, wiring a cron route under src/app/api/cron/.../route.ts following the handler conventions, and enabling the admin “run now” + watchdog coverage so failures and missed runs become visible and actionable.

Frequently Asked Questions about kb-cron-jobs

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

FAQPage Schema
How do I prevent configuration drift in Vercel cron jobs for Next.js?▼

Prevent Vercel cron configuration drift by centralizing job declarations in a single registry and autogenerating vercel.json from it, automatically failing builds if manual edits create mismatches.

How do I secure Next.js cron routes on Vercel with CRON_SECRET?▼

Secure Next.js cron routes by enforcing CRON_SECRET authorization headers, requiring force-dynamic execution, and aligning maxDuration limits with your central job registry configuration.

What's the best way to track and log Next.js cron job run history?▼

Track cron job runs by persisting execution history to a database table, emitting structured logs, and implementing stale-run cleanup alongside a consolidated watchdog meta-cron for detecting failures.

Can I manually trigger a scheduled Vercel cron job from an admin UI?▼

Yes, you can manually trigger scheduled crons from an admin UI using the exact same handler conventions, while toggling jobs on or off via database flags without removing registry entries.

Does a registry-driven cron job approach work outside of Vercel?▼

Yes, a registry-driven cron approach remains portable beyond Vercel by keeping the job registry static while swapping the configuration generator for platforms like Render, Railway, or self-hosted queues.

Why do my Next.js scheduled tasks fail silently without retry logic?▼

Scheduled tasks fail silently without structured run tracking and retry logic, which you can fix by implementing runWithRetry contracts, idempotency checks, and watchdog meta-monitoring for missed runs.