Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

cronstrue

Latest version: v3.50.0

Overview

Last scanned
24 Nov 2026
Published
24 Nov 2026
npm package Publisher: bradymholt
1,644 Stars
201 Forks
25 Versions
24.1M Downloads
TypeScript Repo language

Scan summary

cronstrue was last scanned on 24 Nov 2026 at version 3.50.0. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 25 versions; the latest 5 were published within 2 days (23 and 24 Nov 2026).
  • Findings: No rules fired in version 3.50.0.
  • Downloads: 24,149,784 downloads.

Versions

25 versions published
Versions and the rules that fired in each
VersionPublishedStatus
3.50.0 LATEST 24 Nov 2026 No rules fired
3.49.0 24 Nov 2026 No rules fired
3.48.0 24 Nov 2026 No rules fired
3.47.0 24 Nov 2026 Not shown
3.46.0 23 Nov 2026 Not shown

No rules fired in 3.50.0

Findings

Findings for v3.50.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 3.50.0; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

cRonstrue

Build npm version npm downloads Bundle size Types License: MIT

Would you take a quick second and ⭐️ my repo?

cRonstrue is a JavaScript library that parses a cron expression and outputs a human readable description of the cron schedule. For example, given the expression "*/5 \" it will output "Every 5 minutes".

cronstrue.toString("*/5 * * * *"); // "Every 5 minutes"
cronstrue.toString("0 23 ? * MON-FRI"); // "At 11:00 PM, Monday through Friday"
cronstrue.toString("0 9 * * 1", { locale: "fr" }); // "À 09:00, uniquement le lundi"

Try it in the live demo →

This library was ported from the original C# implementation called cron-expression-descriptor and is also available in Java, Python, Ruby, Go, PHP, Rust, Swift and more.

Features

  • Zero dependencies
  • TypeScript type definitions included
  • Supports all cron expression special characters including * / , - ? L W, #
  • Supports 5, 6 (w/ seconds or year), or 7 (w/ seconds and year) part cron expressions
  • Quartz Job Scheduler cron expressions are supported
  • Supports time specification nicknames (@yearly, @annually, @monthly, @weekly, @daily, @midnight, @hourly, @reboot)
  • i18n support with 40+ languages
  • CLI: npx cronstrue "*/5 * * * *"

Installation

cRonstrue is exported as an UMD module so it will work in an AMD, CommonJS or browser global context.

First, install the module:

npm install cronstrue

Then, depending upon your usage context, add a reference to it:

Node / CommonJS
const cronstrue = require('cronstrue');
ESM / webpack / TypeScript
import cronstrue from 'cronstrue';
Browser

The cronstrue.min.js file from the /dist folder in the npm package should be served to the browser. There are no dependencies so you can simply include the library in a <script> tag.

<script src="cronstrue.min.js" type="text/javascript"></script>
<script>
  var cronstrue = window.cronstrue;
</script>
CDN

A simple way to load the library in a browser is by using the unpkg CDN, which is a "fast, global content delivery network for everything on npm". To use it, include a script tag like this in your file:

<script src="https://unpkg.com/cronstrue@latest/dist/cronstrue.min.js" async></script>

Using the "latest" tag will result in a 302 redirect to the latest version tag so it is recommended to use a specific version tag such as https://unpkg.com/cronstrue@3.48.0/dist/cronstrue.min.js to avoid this redirect.

Usage

cronstrue.toString("* * * * *");
> "Every minute"

cronstrue.toString("0 23 ? * MON-FRI");
> "At 11:00 PM, Monday through Friday"

cronstrue.toString("0 23 * * *", { verbose: true });
> "At 11:00 PM, every day"

cronstrue.toString("23 12 * * SUN#2");
> "At 12:23 PM, on the second Sunday of the month"

cronstrue.toString("23 14 * * SUN#2", { use24HourTimeFormat: true });
> "At 14:23, on the second Sunday of the month"

cronstrue.toString("* * * ? * 2-6/2", { dayOfWeekStartIndexZero: false });
> "Every second, every 2 days of the week, Monday through Friday"

cronstrue.toString("* * * 6-8 *", { monthStartIndexZero: true });
> "Every minute, July through September"

cronstrue.toString("@monthly");
> "At 12:00 AM, on day 1 of the month"

For more usage examples, including a demonstration of how cRonstrue can handle some very complex cron expressions, you can reference the unit tests.

i18n

By default, only the English translation (en) is included when you import and use cRonstrue. To use other languages, please see the i18n section below.

CLI Usage
❯ npx cronstrue "*/5 * * * *"
Every 5 minutes

Options

An options object can be passed as the second parameter to cronstrue.toString. The following options are available:

  • throwExceptionOnParseError: boolean - If exception occurs when trying to parse expression and generate description, whether to throw or catch and output the Exception message as the description. (Default: true)
  • verbose: boolean - Whether to use a verbose description (Default: false)
  • dayOfWeekStartIndexZero: boolean - Whether to interpret cron expression DOW 1 as Sunday or Monday. (Default: true)
  • monthStartIndexZero: boolean - Whether to interpret January as 0 or 1. (Default: false)
  • use24HourTimeFormat: boolean - If true, descriptions will use a 24-hour clock (Default: false but some translations will default to true)
  • trimHoursLeadingZero: boolean - Whether to trim the leading zero that may appear in the hours description; e.g. "02:00 AM" -> "2:00 AM", "08:00" -> "8:00" (Default: false)
  • locale: string - The locale to use (Default: "en")
  • logicalAndDayFields: boolean - If true, descriptions for cron expressions with both day of month and day of week specified will follow a logical-AND wording rather than logical-OR wording; e.g. "...between day 11 and 17 of the month, only on Friday" rather than "...between day 11 and 17 of the month, and on Friday" (Default: false)

i18n

To use the i18n support cRonstrue provides, you can either import all the supported locales at once (using cronstrue/i18n) or import individual locales (using cronstrue/locales/[locale]). Then, when calling toString you pass in the name of the locale you want to use. For example, for the es (Spanish) locale, you would use: cronstrue.toString("* * * * *", { locale: "es" }).

All Locales

You can import all locales at once with cronstrue/i18n. This approach has the advantage of only having to load one module and having access to all supported locales. The tradeoff with this approach is a larger module (~190k, minified) that will take longer to load, particularly when sending down to a browser.

// Node / CommonJS
const cronstrue = require('cronstrue/i18n');

// ESM / webpack / TypeScript
import cronstrue from 'cronstrue/i18n';

// Browser
<script src="https://unpkg.com/cronstrue@latest/dist/cronstrue-i18n.min.js" async></script>

cronstrue.toString("*/5 * * * *", { locale: "fr" }); // => Toutes les 5 minutes
cronstrue.toString("*/5 * * * *", { locale: "es" }); // => Cada 5 minutos
Individual Locales

You can also load the main cronstrue module and then load individual locale modules you want to have access to. This works well when you have one or more locales you know you need access to and want to minimize load time, particularly when sending down to a browser. The main cronstrue module is about 26k (minified) and each locale is about 5k (minified) in size.

// Node / CommonJS
const cronstrue = require('cronstrue');
require('cronstrue/locales/fr');
require('cronstrue/locales/es');

// ESM / webpack / TypeScript
import cronstrue from 'cronstrue';
import 'cronstrue/locales/fr';
import 'cronstrue/locales/es';

// Browser
<script src="https://unpkg.com/cronstrue@latest/dist/cronstrue.min.js" async></script>
<script src="https://unpkg.com/cronstrue@latest/locales/fr.min.js" async></script>
<script src="https://unpkg.com/cronstrue@latest/locales/es.min.js" async></script>

cronstrue.toString("*/5 * * * *", { locale: "fr" }); // => Toutes les 5 minutes
cronstrue.toString("*/5 * * * *", { locale: "es" }); // => Cada 5 minutos
Supported Locales

The following locales can be passed in for the locale option. Thank you to the author (shown below) of each translation!

Code Language Translated by
en English Brady Holt
af Afrikaans Michael van Niekerk
ar Arabic Mohamed Nehad Shalabi
az Azerbaijani Jamal Kamaladdin
be Belarusian Kirill Mikulich
bg Bulgarian kamenf
ca Catalan Francisco Javier Barrena
cs Czech hanbar
da Danish Rasmus Melchior Jacobsen
de German Michael Schuler
es Spanish Ivan Santos
fa Farsi A. Bahrami
fi Finnish Mikael Rosenberg
fr French Arnaud TAMAILLON
he Hebrew Ilan Firsov
hr Croatian Rok Šekoranja
hu Hungarian Orcsity Norbert, Szabó Dániel
id Indonesian Hasan Basri
it Italian rinaldihno
ja Japanese Alin Sarivan
ko Korean Ion Mincu
my Malay (Malaysia) Ikhwan Abdullah
nb Norwegian (Bokmål) Siarhei Khalipski
nn Norwegian (Nynorsk) Arvind
nl Dutch TotalMace
pl Polish foka
pt_BR Portuguese (Brazil) Renato Lima
pt_PT Portuguese (Portugal) POFerro
ro Romanian Illegitimis
ru Russian LbISS
sk Slovak hanbar
sl Slovenian Jani Bevk
sw Swahili Leylow Lujuo
sv Swedish roobin
sr Serbian Miloš Paunović
tg Tajik Ismoil Vakhidov
th Thai Teerapat Prommarak
tr Turkish Mustafa SADEDİL
uk Ukrainian Taras
vi Vietnamese Nguyen Tan Phap
zh_CN Chinese (Simplified) Star Peng
zh_TW Chinese (Traditional) Ricky Chiang

Frequently Asked Questions

  1. The cron expression I am passing in is not valid and this library is giving strange output. What should I do?

    This library does not do full validation of cron expressions and assumes the expression passed in is valid. If you need to validate an expression consider using a library like cron-parser. Example validation with cron-parser:

    import { CronExpressionParser } from "cron-parser";
    import cronstrue from "cronstrue";
    
    const expression = "* * * * * *";
    
    const isCronValid = (() => {
      try {
        CronExpressionParser.parse(expression);
        return true;
      } catch {
        return false;
      }
    })();
    
    if (isCronValid) {
      console.log(cronstrue.toString(expression));
    }
  2. Can cRonstrue output the next occurrence of the cron expression?

    No, cRonstrue does not support this. This library simply describes a cron expression that is passed in. You can do this with a library like croner. Example:

    import { Cron } from 'croner';
    const job = new Cron('0 9 * * 1-5');
    console.log(job.nextRun());      // next Date
    console.log(job.nextRuns(5));    // next 5 Dates

Sponsors

Thank you to the following sponsors of this project!

License

cRonstrue is freely distributable under the terms of the MIT license.

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm cronstrue

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Vulnerability Insights

OpenSSH Password Authentication Bypass on Alpine Linux (*sshole) – CVE-2026-123158

Copy of Template Design OX Blog (1)
Research

Thousands Of GitHub Accounts Hijacked With wfx-loot CI Secret Stealing Malware Via GitHub Actions & npm

Cry2Wolf: How to Tell a Real Bug from a Nothingburger
AI & VibeSec

Cry2Wolf: Not Every Branded Bug Deserves a Fire Drill

Frame 2085668439 (1)
Group 1261154229