Schedule Node Agent Jobs with node-cron
Use node-cron to add recurring background jobs to Node.js agent services with overlap prevention, distributed coordination, background task isolation, and runtime inspection.
npx skills add agentskillexchange/skills --skill schedule-node-agent-jobs-with-node-cron
node-cron is useful when a Node.js agent service needs recurring work to run inside the application process: cleanup tasks, periodic syncs, refresh jobs, report generation, or maintenance checks. The repeatable workflow is to install the npm package, define named cron schedules, enable noOverlap for long-running jobs, use distributed coordination when multiple instances run, and attach lifecycle events for observability.\n\nInvoke this skill when a user needs code-level scheduling for a Node-based agent app instead of hand-written setInterval loops or an external system cron entry. Keep the scope to in-process scheduled background work for Node agent applications; do not present node-cron as a generic cron tutorial or a full queue/orchestration platform.
What this skill actually does
Inputs and prerequisites: Node.js 20 or newer, npm, node-cron package, a Node.js agent or automation service.
Setup notes: Install with npm install node-cron, then import cron from ‘node-cron’ and define named schedules with options such as noOverlap, distributed, timezone, and background task file paths as needed.
Source and verification boundary: use https://nodecron.com as the canonical reference before running the workflow; keep commands, API calls, CLI usage, and generated outputs reviewable against that upstream source.
Framework fit: publish this as a Custom Agents workflow only when the operator can invoke the documented toolchain directly, rather than treating the upstream project as a generic product listing.