ToolsCourt
Cron ToolsNode.js Cron
🟢 Node.js

Node.js Cron Expression Builder

Free Node.js cron expression builder. Generate ready-to-use code for node-cron, cron (CronJob), node-schedule, and Bree — with timezone support. Compare the top 4 Node.js cron packages to pick the right one for your project.

📦 Choose Your Package
🔧 Expression Builder
Minute
0-59
Hour
0-23
Day/Month
1-31
Month
1-12
Day/Week
0=Sun
0 9 * * 1-5
Runs at minute 0 at 9:00 AM
Function name
Timezone
📋 Generated Code
node-cron (CommonJS)
const cron = require('node-cron');

// Schedule: Runs at minute 0 at 9:00 AM
cron.schedule('0 9 * * 1-5', () => {
  scheduledTask();
}, {
  timezone: 'Asia/Kolkata'
});

function scheduledTask() {
  console.log('Running at:', new Date().toISOString());
  // Your task logic here
}
ESM / import syntax
// ESM / ES Modules version (node-cron)
import cron from 'node-cron';

cron.schedule('0 9 * * 1-5', () => {
  console.log('Running:', new Date().toISOString());
}, { timezone: 'Asia/Kolkata' });
❓ Node.js Cron FAQ
Which Node.js cron package should I use?

For most projects: node-cron (simple, zero deps) or cron/CronJob (TypeScript-friendly, timezone built-in). Use node-schedule if you need date-based scheduling beyond cron syntax. Use Bree if you want worker thread isolation so crashed jobs don't affect your main process.

How do I set timezone in node-cron?

Pass a timezone option: cron.schedule("0 9 * * *", fn, { timezone: "Asia/Kolkata" }). Valid values are IANA timezone names like "UTC", "America/New_York", or "Asia/Kolkata".

How do I stop a node-cron job?

const task = cron.schedule(...); task.stop(); — stops future executions. task.destroy(); — permanently removes the task. Store the returned object to control the job later.

Can Node.js cron run every second?

node-cron supports a 6th field for seconds: cron.schedule("*/5 * * * * *", fn) runs every 5 seconds. Not all packages support this — check your package's documentation.

What happens if my Node.js process restarts?

Cron jobs defined in code don't persist — they restart with the process. For persistence, use a database-backed queue (Bull, BullMQ) or a dedicated scheduler like Agenda. For simple cases, use PM2 to keep the process alive.

Other Platform Cron Generators

← Back to Cron Job Generator
Complete cron expression builder for all platforms
View Pillar →
🕐 Next 8 Run Times
1Mon, 18 May, 09:00 amNEXT
2Tue, 19 May, 09:00 am
3Wed, 20 May, 09:00 am
4Thu, 21 May, 09:00 am
5Fri, 22 May, 09:00 am
6Mon, 25 May, 09:00 am
7Tue, 26 May, 09:00 am
8Wed, 27 May, 09:00 am
📦 Package Installnpm install node-cron
🚀 CronCourt Pro
Monitor Node.js cron jobs
Track runs, alert on failures, detect conflicts across your Node.js services.
Join waitlist →