PHPackages                             heartsentwined/cron-expr-parser - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. heartsentwined/cron-expr-parser

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

heartsentwined/cron-expr-parser
===============================

Parse cron expressions and match them against time.

v2.0.5(9y ago)412.0k5ISCPHPPHP &gt;=5.3.3

Since Sep 19Pushed 9y ago3 watchersCompare

[ Source](https://github.com/heartsentwined/php-cron-expr-parser)[ Packagist](https://packagist.org/packages/heartsentwined/cron-expr-parser)[ Docs](https://github.com/yalesov/php-cron-expr-parser)[ RSS](/packages/heartsentwined-cron-expr-parser/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (2)Versions (11)Used By (0)

Yalesov\\CronExprParser
=======================

[](#yalesovcronexprparser)

[![Build Status](https://camo.githubusercontent.com/74707b668dcea62fad2fb462e39a78b3c87f1c771b81e42f4d60e1958ebb2c21/68747470733a2f2f7472617669732d63692e6f72672f79616c65736f762f7068702d63726f6e2d657870722d7061727365722e737667)](https://travis-ci.org/yalesov/php-cron-expr-parser)

Parse cron expressions and match them against time.

Installation
============

[](#installation)

[Composer](http://getcomposer.org/):

```
{
  "require": {
    "yalesov/cron-expr-parser": "2.*"
  }
}
```

Usage
=====

[](#usage)

Parse a Cron expression and a time, and determine if the given time falls within the given cron expression.

```
use Yalesov\CronExprParser\Parser;
$match    = Parse::matchTime('next Thursday', '* * * * 4');
$notMatch = Parse::matchTime('next Friday', '* * * * 4');
```

Function signature:

```
public static function matchTime($time, $expr)
```

`$time` is either a timestamp, or a [`strtotime`](http://php.net/manual/en/function.strtotime.php)-compatible string.

`$expr` is any valid cron expression, in addition supporting:

- range: `0-5`
- range + interval: `10-59/5`
- comma-separated combinations of these: `1,4,7,10-20`
- English months: `january`
- English months (abbreviated to three letters): `jan`
- English weekdays: `monday`
- English weekdays (abbreviated to three letters): `mon`
- These text counterparts can be used in all places where their numerical counterparts are allowed, e.g. `jan-jun/2`
- A full example: `0-5,10-59/5 * 2-10,15-25 january-june/2 mon-fri` (every minute between minute 0-5 + every 5th minute between 10-59; every hour; every day between day 2-10 and day 15-25; every 2nd month between January-June; Monday-Friday)

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 90.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~154 days

Recently: every ~0 days

Total

10

Last Release

3597d ago

Major Versions

0.1.0 → 1.0.02012-09-19

1.0.2 → v2.0.02016-07-05

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2252978?v=4)[heartsentwined](/maintainers/heartsentwined)[@heartsentwined](https://github.com/heartsentwined)

---

Top Contributors

[![yalesov](https://avatars.githubusercontent.com/u/20264293?v=4)](https://github.com/yalesov "yalesov (10 commits)")[![BnitoBzh](https://avatars.githubusercontent.com/u/2962152?v=4)](https://github.com/BnitoBzh "BnitoBzh (1 commits)")

---

Tags

cron

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/heartsentwined-cron-expr-parser/health.svg)

```
[![Health](https://phpackages.com/badges/heartsentwined-cron-expr-parser/health.svg)](https://phpackages.com/packages/heartsentwined-cron-expr-parser)
```

###  Alternatives

[dragonmantank/cron-expression

CRON for PHP: Calculate the next or previous run date and determine if a CRON expression is due

4.7k474.1M487](/packages/dragonmantank-cron-expression)[lorisleiva/cron-translator

Makes CRON expressions human-readable

3148.5M31](/packages/lorisleiva-cron-translator)[symfony/scheduler

Provides scheduling through Symfony Messenger

8810.8M52](/packages/symfony-scheduler)[mybuilder/cronos

Configure Cron task through PHP

152526.8k2](/packages/mybuilder-cronos)[mult1mate/cron-manager

Flexible cron tasks manager for MVC-type applications

40338.5k3](/packages/mult1mate-cron-manager)[butschster/cron-expression-generator

Cron expression generator

511.4M2](/packages/butschster-cron-expression-generator)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
