BackendBench
Coffee

Home โ€บ Cron โ€บ node-cron

node-cron

node-cron Expression Generator & Tester

node-cron schedules tasks in Node.js with a cron string. Unlike classic crontab it accepts an optional leading seconds field, and it requires day-of-month and day-of-week to both match. Type an expression to see what it means and when it fires.

Your week at a glance
fewer more runs

Upcoming runs

#LocalUTCFrom now

Copy-ready code

What to know about node-cron cron

Common node-cron schedules

Ready-made expressions for the schedules people search for most. Each page explains the expression and shows the first run times.

Frequently asked questions

Does node-cron support seconds?

Yes. The first field is an optional seconds field, so */10 * * * * * runs every ten seconds. With five fields the task runs at second 0.

Why does my schedule rarely run?

Because node-cron ANDs the day fields. 0 10 1 * 1 means "the 1st AND a Monday", which happens only a few times a year. Leave one of the day fields as *.

How do I run something on the first Monday of the month?

Use 0 9 1-7 * 1: days 1 to 7, and Monday. Because both must match, only the first Monday qualifies.

Moving a schedule between systems? Use the cron format converter, or read the cron error fixes.

More tools you might need