PHPackages                             sivaschenko/utility-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. sivaschenko/utility-cron

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

sivaschenko/utility-cron
========================

Cron PHP library

1.0.0(9y ago)7120.3k↑65.9%3MITPHP

Since Nov 20Pushed 7y ago1 watchersCompare

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

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

PHP Cron Library
================

[](#php-cron-library)

[![Codacy Badge](https://camo.githubusercontent.com/73cfec799fca983bd8a8733fb9a8f73541e2204a4fe4384be3d10f1f4b373ab6/68747470733a2f2f6170692e636f646163792e636f6d2f70726f6a6563742f62616467652f47726164652f3862633137383039353635643435613761313161653062363765323964373766)](https://www.codacy.com/app/serg.ivashchenko/utility-cron?utm_source=github.com&utm_medium=referral&utm_content=sivaschenko/utility-cron&utm_campaign=badger)[![Build Status](https://camo.githubusercontent.com/d0910b4961ba744e26849d366288648c870e933266e79a50a8904e47b05dd09b/68747470733a2f2f7472617669732d63692e6f72672f73697661736368656e6b6f2f7574696c6974792d63726f6e2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/sivaschenko/utility-cron)[![StyleCI](https://camo.githubusercontent.com/5f0763a4882021fc31123cbb7a8e4cfc59a67d7e7ac9423ee294839741897278/68747470733a2f2f7374796c6563692e696f2f7265706f732f37333130383032322f736869656c643f7374796c653d666c6174)](https://styleci.io/repos/73108022)[![codecov](https://camo.githubusercontent.com/c19037374dd3be5428c0289738cc9900ef0dcc5f9b298b859c7d1878c41c3859/68747470733a2f2f636f6465636f762e696f2f67682f73697661736368656e6b6f2f7574696c6974792d63726f6e2f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/sivaschenko/utility-cron)

The PHP Cron Library can be used to get human readable cron expression description and detailed validation messages. Any level of expression complexity is handled.

Code examples
=============

[](#code-examples)

Human readable cron expression description example:

```
$expression = \Sivaschenko\Utility\Cron\ExpressionFactory::getExpression('5 4 8 * *');

echo $expression->getVerbalString(); // "At 04:05, on 8th day of month."

```

Cron expression validation example:

```
$expression = \Sivaschenko\Utility\Cron\ExpressionFactory::getExpression('60 * * * 2- *');

if (!$expression->isValid()) {
    print_r($expression->getValidationMessages());
}

/*
Array
(
    [0] => Minute expression part value "60" is greater than max allowed "59"
    [1] => Missing second part of "range" expression ("2-")
)
*/

```

Functionality examples
======================

[](#functionality-examples)

Examples of expression translation to verbal format:

Cron ExpressionDescription\* \* \* \* \*At every minute.@weeklyOn Monday at midnight5 4 8 \* \*At 04:05, on 8th day of month.\* \* \* \* FRIL \*At every minute, on last Friday of the month.\* \* \* 2/2 mon/3At every minute, every 2nd month starting from February, every 3rd day of week starting from Monday.30/5 2-6 ? jan,feb 2#4 2017Every 5th minute starting from 30th, every hour from 2nd through 6th, in January and February, every 4th Tuesday, in 2017Examples of cron expression validation:

Invalid Cron ExpressionValidation Messagesfd \* \* \* \* \*Minute expression part value "fd" is not valid! Allowed values are integers from 0 to 59, keywords: "\*", "?"60 \* \* \* 2# \*Minute expression part value "60" is greater than max allowed "59", Missing second part of "each" expression ("2#")\* \* \* \* mon/tue \*Second part of expression "mon/tue" can only be integer!\* \* 4L \* \* \*Day of month expression part value "4L" is not valid! Allowed values are integers from 1 to 31, keywords: "\*", "?", "W", "L" Allowed suffixes: "W"@invalidUnknown shortcut expression "@invalid"! List of valid shortcut expressions: "@reboot", "@midnight", "@daily", "@yearly", "@annually", "@monthly", "@weekly", "@hourly".Installation
============

[](#installation)

Add dependency on library to composer.json and update or execute the following command:

```
composer require sivaschenko/utility-cron

```

Be sure to require composer generated autoload in your project:

```
require 'vendor/autoload.php';

```

Now see "Code examples" for usage instructions.

Test Coverage
=============

[](#test-coverage)

Verbal translation, validation and even exceptions are covered with integration tests.

See [\\Sivaschenko\\Utility\\Cron\\Test\\ExpressionTest](//github.com/sivaschenko/utility-cron/blob/master/Sivaschenko/Utility/Cron/Test/ExpressionTest.php) for details.

---

Crafted with ♥ for developers.

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity37

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 84.2% 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

Unknown

Total

1

Last Release

3466d ago

### Community

Maintainers

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

---

Top Contributors

[![sivaschenko](https://avatars.githubusercontent.com/u/2028541?v=4)](https://github.com/sivaschenko "sivaschenko (16 commits)")[![erythro](https://avatars.githubusercontent.com/u/1539822?v=4)](https://github.com/erythro "erythro (2 commits)")[![codacy-badger](https://avatars.githubusercontent.com/u/23704769?v=4)](https://github.com/codacy-badger "codacy-badger (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[koss-shtukert/laravel-nova-select2-auto-complete

A Laravel Nova field.

39310.1k](/packages/koss-shtukert-laravel-nova-select2-auto-complete)[werd/ivona-speechcloud-sdk-php

IVONA SpeechCloud SDK for PHP

102.1k](/packages/werd-ivona-speechcloud-sdk-php)

PHPackages © 2026

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