git404hub

what is node-cron fr?

kelektiv/node-cron — explained in plain English

Analysis updated 2026-06-24

8,928TypeScriptAudience · developerComplexity · 2/5Setup · easy

tl;dr

node-cron is a Node.js library that schedules code to run at specific times or on repeating intervals using cron syntax, handling everything from daily jobs to sub-second tasks.

vibe map

mindmap
  root((repo))
    What It Does
      Schedule recurring tasks
      Cron syntax support
      Sub-second precision
      Start and stop jobs
    Tech Stack
      TypeScript
      Node.js
      Luxon
    Use Cases
      Daily email sends
      Database cleanup
      Backup scheduling
    Features
      CronJob class
      Next-run utilities
      Expression validation

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

what do people make with this?

VIBE 1

Schedule a Node.js function to send daily emails at 8am using a simple cron expression and time zone setting.

VIBE 2

Run database cleanup or backup tasks on a recurring weekly schedule inside a Node.js application.

VIBE 3

Validate cron expressions and preview the next scheduled trigger time before deploying a job to production.

VIBE 4

Control job start and stop programmatically, enabling dynamic scheduling based on application state or user settings.

what's the stack?

TypeScriptNode.jsLuxon

how it stacks up fr

kelektiv/node-cronblacksmithgu/obsidian-dataviewnapneko/napcatqq
Stars8,9288,9258,934
LanguageTypeScriptTypeScriptTypeScript
Setup difficultyeasyeasymoderate
Complexity2/52/53/5
Audiencedeveloperwriterdeveloper

Figures from each repo's GitHub metadata at analysis time.

how do i run it?

Difficulty · easy time til it works · 5min

in plain english

node-cron is a TypeScript library for Node.js that lets you schedule code to run automatically at specific times or on repeating schedules. If you want your application to send a daily email at 8am, clean up old files every Sunday, or run a data backup every hour, this library handles that scheduling logic for you. Schedules are written using cron syntax, a compact notation originally from Unix systems. A pattern like 0 8 * means "at 8:00am every day." The library extends the standard five-field format with an optional sixth field for seconds, so you can schedule tasks down to the second if needed. You can also pass a JavaScript Date object or a Luxon DateTime object instead of a cron string if you prefer to work with dates directly. The main building block is the CronJob class. You create a job by providing a schedule, a function to run, and optional settings like the time zone and whether to start the job immediately. Jobs can be started and stopped programmatically. There are also standalone utility functions: one tells you when a given cron expression will next fire, one returns the number of milliseconds until the next trigger, and one validates whether a cron expression is written correctly. Version 3 introduced TypeScript support and aligned month and day-of-week numbering with standard Unix cron conventions. Version 4 dropped support for Node.js 16 and made the job's running-state property read-only. The README includes a migration guide covering the specific changes between major versions. The library works with Node.js 18 and above and is available on npm. It is a common choice for background task scheduling in Node.js applications.

prompts (copy fr)

prompt 1
Show me how to create a CronJob in node-cron that runs a database cleanup function every Sunday at midnight in the America/New_York time zone.
prompt 2
Write a node-cron job that sends an API request every 30 seconds and logs the response, with the ability to pause and resume the job.
prompt 3
How do I use node-cron's utility functions to validate a cron expression and find out exactly when it will next fire?
prompt 4
Help me migrate a node-cron v2 job to v3, handling the changes in month numbering and the new TypeScript types.

Frequently asked questions

what is node-cron fr?

node-cron is a Node.js library that schedules code to run at specific times or on repeating intervals using cron syntax, handling everything from daily jobs to sub-second tasks.

What language is node-cron written in?

Mainly TypeScript. The stack also includes TypeScript, Node.js, Luxon.

How hard is node-cron to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is node-cron for?

Mainly developer.

peek the repo → explain another one

This repo across BitVibe Labs

double-check against the repo, no cap.