node-cron Expression Generator
node-cron schedules tasks in Node.js using familiar Unix-style cron, with an optional leading Seconds field. Because jobs run inside your Node process, the schedule follows the server's local timezone unless you pass one explicitly.
Build a schedule below and copy the cron.schedule() call into your application.
Expression
Tip: press Ctrl+Enter to copy
Presets
Visual Builder
Description
At 09:00 AM, Monday through Friday
Node-cron cron syntax
| Min | Hour | Day | Month | DOW |
|---|---|---|---|---|
| 0 | 9 | * | * | 1-5 |
- Five fields (Minute, Hour, Day-of-month, Month, Day-of-week), or six with an optional leading Seconds field.
- Called as cron.schedule('<expr>', () => { ... }).
- Runs in the Node process's local timezone unless you pass { timezone: 'Area/City' }.
- Day-of-week accepts 0-7 (0 and 7 are Sunday) or names like mon-fri.
- The task only runs while your Node process is alive — there's no persistence across restarts.
Node-cron cron examples
Click any example to load it into the generator above.
Frequently asked questions
What timezone does node-cron use?
By default it uses the timezone of the machine running your Node process. To pin a zone, pass an options object: cron.schedule('0 9 * * 1-5', task, { timezone: 'America/New_York' }).
Does node-cron support a seconds field?
Yes. node-cron accepts an optional sixth (leading) field for seconds, so '*/10 * * * * *' runs every 10 seconds. With five fields it behaves like standard Unix cron.
Do scheduled tasks survive a server restart?
No. node-cron runs in-process, so tasks only fire while your Node application is running. For durable scheduling across restarts, use a system cron, a job queue, or a managed scheduler.