Cron generator

Node cron generator

Build node-cron expressions for JavaScript jobs. Preview the schedule, copy the expression, and understand which jobs need timezone handling.

*/15 * * * *
node-cron uses familiar cron syntax.
Most jobs use the five-field format: minute, hour, day of month, month, day of week.
Timezone needs a decision.
Set it explicitly for customer reminders, reports, billing, and other time-sensitive jobs.
Your process must be alive.
A cron expression cannot run if the Node process, container, or worker is stopped.

When this schedule fits

The expression */15 * * * * runs every 15 minutes. It is sensible for lightweight polling, cache refreshes, queue cleanup, or a recurring sync that can tolerate small delays. It is not a good choice for heavyweight jobs unless you have locking, backoff, and monitoring in place. If the previous run can still be active when the next one starts, add a guard so you do not create overlapping work.

Copy-ready example

import cron from 'node-cron';

cron.schedule('*/15 * * * *', () => {
  // run task
}, {
  timezone: 'Europe/London'
});

Common mistakes

The common failure is assuming node-cron behaves like a managed scheduler. It runs inside your app process, so deploys, crashes, autoscaling, and server restarts all matter. In multi-instance deployments, each instance may run the same schedule unless you use a leader, queue, lock, or external scheduler. For jobs that send money, emails, reminders, or destructive updates, write the task so it can be safely retried.

Useful node-cron patterns

# Every 15 minutes
*/15 * * * *

# Every day at 06:00
0 6 * * *

# Monday to Friday at 17:30
30 17 * * 1-5

How to test it

Paste the expression into the main builder and check the next run times. Then run the callback manually in a development script before relying on the schedule. Log the start, result, and duration of each run. For production systems, add an alert if the job has not completed within the expected window, because silent cron failures are usually discovered too late.

FAQ

Does node-cron keep running after a deploy? Only if the process is running. Restarts, crashed workers, and scaled deployments all affect scheduled jobs.

Can multiple app instances run the same job? Yes. If your app runs on several instances, use locking, a queue, or a single scheduler process.

Should I set a timezone? Set one whenever the job is tied to a human expectation, such as local reports, reminders, invoices, or office-hours tasks.

Use the full builder

Open the Cron Expression Builder to edit this schedule, explain a pasted expression, and preview upcoming run times.