PHPackages                             hollodotme/crontab-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. hollodotme/crontab-expression

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

hollodotme/crontab-expression
=============================

Library to validate crontab expressions and check their due date

v0.1.0(8y ago)0779↓50%[1 PRs](https://github.com/hollodotme/crontab-expression/pulls)MITPHPPHP &gt;=7.1

Since Dec 13Pushed 5y ago1 watchersCompare

[ Source](https://github.com/hollodotme/crontab-expression)[ Packagist](https://packagist.org/packages/hollodotme/crontab-expression)[ RSS](/packages/hollodotme-crontab-expression/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (3)Used By (0)

[![Build Status](https://camo.githubusercontent.com/a9187ed477b14e8041a09ee86916355083a05683bb7928e67f50d47bb2110ef8/68747470733a2f2f7472617669732d63692e6f72672f686f6c6c6f646f746d652f63726f6e7461622d65787072657373696f6e2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/hollodotme/crontab-expression)[![Latest Stable Version](https://camo.githubusercontent.com/f5e21aa4a80eca1156103f17520c44d17987a4b7ec1939fb143738fb5660f5c8/68747470733a2f2f706f7365722e707567782e6f72672f686f6c6c6f646f746d652f63726f6e7461622d65787072657373696f6e2f762f737461626c65)](https://packagist.org/packages/hollodotme/crontab-expression)[![Total Downloads](https://camo.githubusercontent.com/af421c3bd209795bf61631b774f0b1e608d68c889e31baa7f5c7e5a12da02ab5/68747470733a2f2f706f7365722e707567782e6f72672f686f6c6c6f646f746d652f63726f6e7461622d65787072657373696f6e2f646f776e6c6f616473)](https://packagist.org/packages/hollodotme/crontab-expression)[![Coverage Status](https://camo.githubusercontent.com/2581fa76437ca5cbca62dc1947ee15ed579e4c234914a6d2acd43ed0f74f2e45/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f686f6c6c6f646f746d652f63726f6e7461622d65787072657373696f6e2f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/hollodotme/crontab-expression?branch=master)

CrontabExpression
=================

[](#crontabexpression)

Description
-----------

[](#description)

Library to validate crontab expressions and check their due date

Requirements
------------

[](#requirements)

- PHP &gt;= 7.1

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

[](#installation)

```
composer require hollodotme/crontab-expression
```

Usage
-----

[](#usage)

### Validate expressions

[](#validate-expressions)

Expressions are validated on construction of `CrontabExpression`.

If you provide an invalid expression a `hollodotme\CrontabValidator\Exceptions\InvalidExpressionException` will be thrown.

If you need boolean validation of crontab expressions, please use [hollodotme/crontab-validator](https://github.com/hollodotme/crontab-validator). The `hollodotme/crontab-validator` package is a dependency for this package (hollodotme/crontab-expression), so you can also use the validator separately:

```
