cron

Cron-style job scheduler for Node.js. Uses standard cron syntax to schedule recurring tasks (with second-level precision as optional 6th field). Supports timezone-aware scheduling via the luxon timezone library, job start/stop control, and fire-once-immediately option. Alternative to node-schedule for pure cron syntax scheduling without complex calendar-based expressions.

Evaluated Mar 07, 2026 (0d ago) v3.x
Homepage ↗ Repo ↗ Developer Tools cron scheduling jobs timer interval automation node
⚙ Agent Friendliness
65
/ 100
Can an agent use this?
🔒 Security
97
/ 100
Is it safe for agents?
⚡ Reliability
82
/ 100
Does it work consistently?

Score Breakdown

⚙ Agent Friendliness

MCP Quality
--
Documentation
82
Error Messages
72
Auth Simplicity
100
Rate Limits
100

🔒 Security

TLS Enforcement
100
Auth Strength
100
Scope Granularity
100
Dep. Hygiene
82
Secret Handling
100

Local computation only. No network, no credentials. MIT licensed. Callback code security is agent responsibility — cron library itself has no attack surface.

⚡ Reliability

Uptime/SLA
90
Version Stability
82
Breaking Changes
80
Error Recovery
78
AF Security Reliability

Best When

You need simple cron-style recurring task scheduling within a single Node.js process using familiar cron syntax with timezone support.

Avoid When

You need distributed scheduling, job persistence across restarts, or complex workflow dependencies — use a proper job queue (BullMQ) or workflow orchestrator.

Use Cases

  • Schedule periodic agent maintenance tasks (cache clearing, data refresh, health checks) using standard cron expressions
  • Run database cleanup or aggregation jobs on a cron schedule within Node.js services
  • Implement scheduled report generation or data export pipelines triggered by time-based cron patterns
  • Create simple recurring background jobs in Express.js or Fastify services without a separate job queue
  • Coordinate multiple time-based agent tasks using named CronJob instances that can be stopped and restarted

Not For

  • Distributed job scheduling across multiple Node.js instances — use Bull/BullMQ with Redis for distributed cron jobs
  • Complex workflow orchestration — use temporal-api, n8n-api, or kestra-api for multi-step agent workflows with dependencies
  • Millisecond-precision timing — cron minimum granularity is 1 second

Interface

REST API
No
GraphQL
No
gRPC
No
MCP Server
No
SDK
Yes
Webhooks
No

Authentication

Methods: none
OAuth: No Scopes: No

Local library — no authentication required. MIT licensed.

Pricing

Model: open_source
Free tier: Yes
Requires CC: No

MIT licensed. Zero cost.

Agent Metadata

Pagination
none
Idempotent
Partial
Retry Guidance
Not documented

Known Gotchas

  • Cron expression has 5 or 6 fields — 6-field version adds seconds as the FIRST field: '*/5 * * * * *' means every 5 seconds; 5-field standard cron '* * * * *' = every minute
  • Jobs are not persistent — process restart loses all scheduled jobs; for persistence use a database-backed scheduler like Agenda or BullMQ
  • Timezone support requires passing timeZone option: new CronJob('0 9 * * *', fn, null, true, 'America/New_York') — without timeZone, uses process system timezone
  • onTick callback errors don't stop the job — implement try/catch in callback or the job silently skips failed executions without alerting
  • Running multiple instances (for HA) of the same service will run jobs N times — distributed environments need external coordination (Redis, DB) to prevent duplicate execution
  • CronJob starts immediately when start:true is passed as 4th argument — alternatively, call .start() manually after construction

Alternatives

Full Evaluation Report

Comprehensive deep-dive: security analysis, reliability audit, agent experience review, cost modeling, competitive positioning, and improvement roadmap for cron.

AI-powered analysis · PDF + markdown · Delivered within 30 minutes

$99

Package Brief

Quick verdict, integration guide, cost projections, gotchas with workarounds, and alternatives comparison.

Delivered within 10 minutes

$3

Score Monitoring

Get alerted when this package's AF, security, or reliability scores change significantly. Stay ahead of regressions.

Continuous monitoring

$3/mo

Scores are editorial opinions as of 2026-03-07.

6451
Packages Evaluated
26150
Need Evaluation
173
Need Re-evaluation
Community Powered