PHPackages                             poliander/cron - 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. [Validation &amp; Sanitization](/categories/validation)
4. /
5. poliander/cron

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

poliander/cron
==============

Standard (V7) compliant crontab expression parser/validator with support for time zones

3.3.1(2mo ago)78342.2k↓14%105GPL-3.0-or-laterPHPPHP 8.3.\* || 8.4.\* || 8.5.\*CI passing

Since Jun 16Pushed 2mo ago3 watchersCompare

[ Source](https://github.com/poliander/cron)[ Packagist](https://packagist.org/packages/poliander/cron)[ Docs](https://github.com/poliander/cron)[ RSS](/packages/poliander-cron/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (2)Versions (38)Used By (5)

PHP Cron Expression Parser
==========================

[](#php-cron-expression-parser)

[![Build Status](https://camo.githubusercontent.com/aa1b38ad991356bd3dc53f845c6d21daedfe9ddb31eb43b52ad04be6fe0ca1ac/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f706f6c69616e6465722f63726f6e2f6261646765732f6275696c642e706e673f623d6d61696e)](https://scrutinizer-ci.com/g/poliander/cron/build-status/main)[![Code Coverage](https://camo.githubusercontent.com/c7fe6cfe28904d1913a91463ad4d95bd460b7a81fc02b8a219ccc915c7f7a6f5/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f706f6c69616e6465722f63726f6e2f6261646765732f636f7665726167652e706e673f623d6d61696e)](https://scrutinizer-ci.com/g/poliander/cron/?branch=main)[![License](https://camo.githubusercontent.com/35ab9152d8b2d88e971c0fbf1f3858ae44a2eb4c5f12dc88202c37acea0a4e91/68747470733a2f2f706f7365722e707567782e6f72672f706f6c69616e6465722f63726f6e2f6c6963656e7365)](https://www.gnu.org/licenses/gpl-3.0.en.html)[![Latest Stable Version](https://camo.githubusercontent.com/e5da33ac909b52abcfe54a785bbc5991ca19f41c3e03be8d7b5cf12ad55fa091/68747470733a2f2f706f7365722e707567782e6f72672f706f6c69616e6465722f63726f6e2f762f737461626c65)](https://packagist.org/packages/poliander/cron)[![Total Downloads](https://camo.githubusercontent.com/e4c233cd97679adcd438949fd2e5fe8e05fcb767ab52fd56cea6057c1ca3f27a/68747470733a2f2f706f7365722e707567782e6f72672f706f6c69616e6465722f63726f6e2f646f776e6c6f616473)](https://packagist.org/packages/poliander/cron)

Standard (V7) compliant crontab expression parser/validator with support for time zones; see "[man 5 crontab](http://www.unix.com/man-page/linux/5/crontab/)" for possible expressions.

- [Installation](#installation)
- [Examples](#examples)
- [Supported PHP Versions](#supported-php-versions)
- [Changelog](#changelog)

Installation
------------

[](#installation)

Using composer, add a requirement for `poliander/cron` to your `composer.json` file:

```
composer require poliander/cron

```

Examples
--------

[](#examples)

Validate a certain crontab expression:

```
use Poliander\Cron\CronExpression;

$expression = new CronExpression('15,45 */2 * * *');
$isValid = $expression->isValid(); // returns true
```

Check whether a given point in time is matching a certain cron expression:

```
use Poliander\Cron\CronExpression;

$expression = new CronExpression('45 9 * * *');
$dt = new \DateTime('2014-05-18 09:45');
$isMatching = $expression->isMatching($dt); // returns true
```

Match an expression across different time zones:

```
use Poliander\Cron\CronExpression;

$expression = new CronExpression('45 9 * * *', new DateTimeZone('Europe/Berlin'));
$dt = new \DateTime('2014-05-18 08:45', new DateTimeZone('Europe/London'));
$isMatching = $expression->isMatching($dt); // returns true
```

Calculate next timestamp matching a Friday, the 13th:

```
use Poliander\Cron\CronExpression;

$expression = new CronExpression('* * 13 * fri');
$when = $expression->getNext();
```

Supported PHP Versions
----------------------

[](#supported-php-versions)

cronPHPNote1.2.\*5.6end of life2.0.\*7.0end of life2.1.\*7.1end of life2.2.\*7.2end of life2.3.\*7.3end of life2.4.\*7.4 - 8.2end of life3.0.\*7.4 - 8.2end of life3.1.\*8.1 - 8.3end of life3.2.\*8.2 - 8.43.3.\*8.3 - 8.5Changelog
---------

[](#changelog)

versionrelease notes1.0.0 (2015-06-20)initial release1.1.0 (2016-06-11)dropped PHP 5.4 support1.2.0 (2016-12-11)added PHP 7.1 support1.2.1 (2017-05-25)fixed #31.2.2 (2017-06-03)fixed #3, #42.0.0 (2017-11-30)dropped PHP 5.x, added PHP 7.2 support, added vendor namespace (closes #2)2.1.0 (2018-12-08)dropped PHP 7.0, added PHP 7.3 support, updated PHPUnit dependency to 7.\*2.2.0 (2019-12-03)dropped PHP 7.1, added PHP 7.4 support, updated PHPUnit dependency to 8.\*2.3.0 (2020-12-29)dropped PHP 7.2, added PHP 8.0 support, updated PHPUnit dependency to 9.\*2.3.1 (2021-10-04)fixed #62.4.0 (2021-12-27)dropped PHP 7.3, added PHP 8.1 support2.4.1 (2022-03-25)fixed #92.4.2 (2022-04-09)fixed #9, #10, #112.4.3 (2022-04-10)fixed #122.4.4 (2022-04-11)fixed #132.4.5 (2022-12-17)fixed #142.4.6 (2022-12-29)added PHP 8.2 support2.4.7 (2023-01-20)fixed #162.4.8 (2023-07-30)fixed #18, #192.4.9 (2023-10-28)fixed #223.0.0 (2022-04-09)namespace changed to avoid package conflict (closes #8)3.0.1 (2022-04-10)fixed #123.0.2 (2022-04-11)fixed #133.0.3 (2022-12-17)fixed #143.0.4 (2022-12-29)added PHP 8.2 support3.0.5 (2023-01-20)fixed #163.0.6 (2023-07-30)fixed #18, #193.0.7 (2023-10-28)fixed #223.1.0 (2023-11-23)added PHP 8.3 support, dropped PHP 7/8.0 support, updated PHPUnit to 10.\*3.2.0 (2024-11-22)added PHP 8.4 support, dropped PHP 8.1 support, updated PHPUnit to 11.\*3.2.1 (2024-12-21)fixed #263.2.2 (2026-03-05)fixed #303.3.0 (2025-11-23)added PHP 8.5 support, dropped PHP 8.2 support3.3.1 (2026-03-05)fixed #30

###  Health Score

68

—

FairBetter than 100% of packages

Maintenance86

Actively maintained with recent releases

Popularity50

Moderate usage in the ecosystem

Community23

Small or concentrated contributor base

Maturity92

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 97.7% 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 ~108 days

Recently: every ~26 days

Total

37

Last Release

74d ago

Major Versions

2.4.3 → 3.0.22022-04-11

2.4.4 → 3.0.32022-12-17

2.4.6 → 3.0.42022-12-29

2.4.7 → 3.0.62023-07-30

2.4.9 → 3.0.72023-10-28

PHP version history (11 changes)1.0.0PHP &gt;=5.4.0

1.1.0PHP &gt;=5.5.0

2.0.0PHP &gt;=7.0

2.1.0PHP &gt;=7.1

2.2.0PHP ~7.2

2.3.0PHP &gt;=7.3

2.4.0PHP ^7.4 || ^8.0 || ^8.1

3.0.3PHP 7.4.\* || 8.0.\* || 8.1.\* || 8.2.\*

3.1.0PHP 8.1.\* || 8.2.\* || 8.3.\*

3.2.0PHP 8.2.\* || 8.3.\* || 8.4.\*

3.3.0PHP 8.3.\* || 8.4.\* || 8.5.\*

### Community

Maintainers

![](https://www.gravatar.com/avatar/c7f21d4c7bd95fe52cfb38a68c4b5ae6b5ffb13f85fb685a04c96dc9523e64c2?d=identicon)[poliander](/maintainers/poliander)

---

Top Contributors

[![poliander](https://avatars.githubusercontent.com/u/7281281?v=4)](https://github.com/poliander "poliander (215 commits)")[![onlime](https://avatars.githubusercontent.com/u/2759561?v=4)](https://github.com/onlime "onlime (2 commits)")[![simoheinonen](https://avatars.githubusercontent.com/u/3840367?v=4)](https://github.com/simoheinonen "simoheinonen (2 commits)")[![vencakrecl](https://avatars.githubusercontent.com/u/6089563?v=4)](https://github.com/vencakrecl "vencakrecl (1 commits)")

---

Tags

croncrontabexpressionparserphpvalidation

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/poliander-cron/health.svg)

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

###  Alternatives

[webmozart/assert

Assertions to validate method input/output with nice error messages.

7.6k894.0M1.2k](/packages/webmozart-assert)[bensampo/laravel-enum

Simple, extensible and powerful enumeration implementation for Laravel.

2.0k15.9M104](/packages/bensampo-laravel-enum)[swaggest/json-schema

High definition PHP structures with JSON-schema based validation

48612.5M73](/packages/swaggest-json-schema)[stevebauman/purify

An HTML Purifier / Sanitizer for Laravel

5325.6M19](/packages/stevebauman-purify)[ashallendesign/laravel-config-validator

A package for validating your Laravel app's config.

217905.3k5](/packages/ashallendesign-laravel-config-validator)[crazybooot/base64-validation

Laravel validators for base64 encoded files

1341.9M8](/packages/crazybooot-base64-validation)

PHPackages © 2026

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