PHPackages                             jpi/cron-linter - 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. [Testing &amp; Quality](/categories/testing)
4. /
5. jpi/cron-linter

ActiveLibrary[Testing &amp; Quality](/categories/testing)

jpi/cron-linter
===============

Tool for linting cron files and expressions

v1.0.0(5mo ago)05[1 issues](https://github.com/jahidulpabelislam/cron-linter/issues)GPL-3.0-onlyPHPPHP ^8.0CI passing

Since Nov 22Pushed 4mo agoCompare

[ Source](https://github.com/jahidulpabelislam/cron-linter)[ Packagist](https://packagist.org/packages/jpi/cron-linter)[ RSS](/packages/jpi-cron-linter/feed)WikiDiscussions 1.x Synced 1mo ago

READMEChangelog (8)Dependencies (4)Versions (9)Used By (0)

Cron Linter
===========

[](#cron-linter)

[![CodeFactor](https://camo.githubusercontent.com/2af6a2dffeeaa5395a8ab4e86d2cf1a450bed19798a2c39c5513f44e77ca5288/68747470733a2f2f7777772e636f6465666163746f722e696f2f7265706f7369746f72792f6769746875622f6a61686964756c706162656c69736c616d2f63726f6e2d6c696e7465722f6261646765)](https://www.codefactor.io/repository/github/jahidulpabelislam/cron-linter)[![Latest Stable Version](https://camo.githubusercontent.com/a90eaa82efb85c5c631aff83928f36a4bccc0809eb1dce3789513dbf9d022916/68747470733a2f2f706f7365722e707567782e6f72672f6a70692f63726f6e2d6c696e7465722f762f737461626c65)](https://packagist.org/packages/jpi/cron-linter)[![Total Downloads](https://camo.githubusercontent.com/e5ae0ded53728c7ab30ec237c53a4dece16cf457237f4a570df62eeec15de2df/68747470733a2f2f706f7365722e707567782e6f72672f6a70692f63726f6e2d6c696e7465722f646f776e6c6f616473)](https://packagist.org/packages/jpi/cron-linter)[![Latest Unstable Version](https://camo.githubusercontent.com/67270691d3688392330cc9cfa0d1eea0602aaad111d67e84e639f36f7ff1c9be/68747470733a2f2f706f7365722e707567782e6f72672f6a70692f63726f6e2d6c696e7465722f762f756e737461626c65)](https://packagist.org/packages/jpi/cron-linter)[![License](https://camo.githubusercontent.com/d2e0013fd0b153a200e184d3ad6521b0bd505a3fd3fad72a2028a51c199e6fce/68747470733a2f2f706f7365722e707567782e6f72672f6a70692f63726f6e2d6c696e7465722f6c6963656e7365)](https://packagist.org/packages/jpi/cron-linter)[![GitHub last commit (branch)](https://camo.githubusercontent.com/1b5a7f6a9c565fa5e14c1acd76f6eb9313111e00f9f307494a7289bde1417074/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6173742d636f6d6d69742f6a61686964756c706162656c69736c616d2f63726f6e2d6c696e7465722f312e782e7376673f6c6162656c3d6c6173742532306163746976697479)](https://camo.githubusercontent.com/1b5a7f6a9c565fa5e14c1acd76f6eb9313111e00f9f307494a7289bde1417074/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6173742d636f6d6d69742f6a61686964756c706162656c69736c616d2f63726f6e2d6c696e7465722f312e782e7376673f6c6162656c3d6c6173742532306163746976697479)

Lint cron files. Based on the work of @Dave13h from , just the PHPCensor aspect removed and made into a standalone package.

Installation
============

[](#installation)

```
composer require --dev jpi/cron-linter
```

Add a `.cronlinter.yml` file to your project root that specifies a list of cron files to lint.

```
files:
  - /cron-1
  - /cron-2
```

Then run `php vendor/bin/lintcron`, which will list any errors found in the specified cron files. You can use a different config file location using the `--config-file` option.

You can also specify files to be linted using the `--files` option, providing a comma-separated list of file paths.

Or if you want to do it programmatically on files or content.

```
// Lint cron files
// $files is an array of file paths for cron files to check
// $baseDir (optional) is a string containing the base directory path for all file paths
$errors = \JPI\CronLinter::lintFiles($files, $baseDir);

// Lint cron content directly
// $expression is a string containing one or more cron expressions (one per line)
$errors = \JPI\CronLinter::lintContent($expression);

// Both methods return an array of error messages, or an empty array if no errors found
```

Support
-------

[](#support)

If you found this library interesting or useful please spread the word about this library: share on your socials, star on GitHub, etc.

If you find any issues or have any feature requests, you can open a [issue](https://github.com/jahidulpabelislam/cron-linter/issues) or email [me @ jahidulpabelislam.com](mailto:me@jahidulpabelislam.com) 😏.

Authors
-------

[](#authors)

- [Jahidul Pabel Islam](https://jahidulpabelislam.com/) [](mailto:me@jahidulpabelislam.com)

Licence
-------

[](#licence)

This module is licenced under the GNU General Public Licence - see the [licence](LICENSE.md) file for details

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance75

Regular maintenance activity

Popularity4

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

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

Total

9

Last Release

123d ago

Major Versions

v0.1.5 → v1.0.02025-12-14

v0.1.6 → 1.x-dev2026-01-15

### Community

Maintainers

![](https://www.gravatar.com/avatar/3eb53275639d93b5fdae3b835527fdb958dbc1214e58a97d10fa50fe66a836cd?d=identicon)[jahidulpabelislam](/maintainers/jahidulpabelislam)

---

Top Contributors

[![jahidulpabelislam](https://avatars.githubusercontent.com/u/15434150?v=4)](https://github.com/jahidulpabelislam "jahidulpabelislam (60 commits)")[![Dave13h](https://avatars.githubusercontent.com/u/13381774?v=4)](https://github.com/Dave13h "Dave13h (13 commits)")[![Copilot](https://avatars.githubusercontent.com/in/1143301?v=4)](https://github.com/Copilot "Copilot (3 commits)")[![andyhartley](https://avatars.githubusercontent.com/u/11887408?v=4)](https://github.com/andyhartley "andyhartley (2 commits)")[![stuartloxton](https://avatars.githubusercontent.com/u/5841?v=4)](https://github.com/stuartloxton "stuartloxton (1 commits)")

---

Tags

cronlinterlinuxphpphptestingcroncontinuous integrationlintciopen-source

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[behat/behat

Scenario-oriented BDD framework for PHP

4.0k96.8M2.0k](/packages/behat-behat)[acquia/orca

A tool for testing a company's software packages together in the context of a realistic, functioning, best practices Drupal build

32902.4k](/packages/acquia-orca)[moodlehq/moodle-plugin-ci

Helps running Moodle plugins analysis checks and tests under various CI environments.

612.6M](/packages/moodlehq-moodle-plugin-ci)[robiningelbrecht/phpunit-coverage-tools

PHPUnit coverage tools

1783.0k34](/packages/robiningelbrecht-phpunit-coverage-tools)

PHPackages © 2026

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