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

ActiveLibrary

williamorazi/cron-expression
============================

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

v1.1.5(9y ago)0103MITPHPPHP &gt;=5.2.17

Since Jun 30Pushed 9y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (7)Used By (0)

PHP Cron Expression Parser for PHP 5.2.17
=========================================

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

The PHP cron expression parser can parse a CRON expression, determine if it is due to run, calculate the next run date of the expression, and calculate the previous run date of the expression. You can calculate dates far into the future or past by skipping n number of matching dates.

The parser can handle increments of ranges (e.g. \*/12, 2-59/3), intervals (e.g. 0-9), lists (e.g. 1,2,3), W to find the nearest weekday for a given day of the month, L to find the last day of the month, L to find the last given weekday of a month, and hash (#) to find the nth weekday of a given month.

Installing
==========

[](#installing)

Add the dependency to your project:

```
composer require williamorazi/cron-expression
```

Usage
=====

[](#usage)

```
