PHPackages                             mike-tralala/cron-expression - 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. mike-tralala/cron-expression

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

mike-tralala/cron-expression
============================

A library to use cron expressions in PHP

1.0.0(8y ago)01.0kMITPHPPHP &gt;=5.5.0

Since Apr 1Pushed 8y ago1 watchersCompare

[ Source](https://github.com/MikeTralala/cron-expression)[ Packagist](https://packagist.org/packages/mike-tralala/cron-expression)[ RSS](/packages/mike-tralala-cron-expression/feed)WikiDiscussions master Synced 2mo ago

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

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

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

[![pipeline status](https://camo.githubusercontent.com/92057297f58cbfa0e309898e39e7d3fc10a3d2bb7f07832b9f1d3185895daa67/68747470733a2f2f6769746c61622e6d696b657472616c616c612e636f6d2f7472616c616c612f63726f6e2d65787072657373696f6e2f6261646765732f6d61737465722f706970656c696e652e737667)](https://gitlab.miketralala.com/tralala/cron-expression/commits/master)[![coverage report](https://camo.githubusercontent.com/a043a7eea69042902c80920a98f128e39b4d951b475cbe00ee943944ce46538f/68747470733a2f2f6769746c61622e6d696b657472616c616c612e636f6d2f7472616c616c612f63726f6e2d65787072657373696f6e2f6261646765732f6d61737465722f636f7665726167652e737667)](https://gitlab.miketralala.com/tralala/cron-expression/commits/master)

This `cron-expression` library can parse cron expressions like `* * * * *` and check if it is due or not. You are also able to determine the next or previous running dates.

This parser can handle anything the normal cron syntax accepts. with 1 exception and that are the named constructs (e.g. mon-thu or jan-dec).

Installing
==========

[](#installing)

Add the dependency to your project:

```
composer require mike-tralala/cron-expression
```

Usage
=====

[](#usage)

```
