PHPackages                             neophp/cronbuilder-package - 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. neophp/cronbuilder-package

ActiveLibrary

neophp/cronbuilder-package
==========================

Dev-only visual builder for cron expressions, with next-run preview

v0.2.2(yesterday)06↑2900%MITPHPPHP &gt;=8.5CI passing

Since Aug 8Pushed yesterdayCompare

[ Source](https://github.com/NeoPHP-Dev/neo-cronbuilder-package)[ Packagist](https://packagist.org/packages/neophp/cronbuilder-package)[ RSS](/packages/neophp-cronbuilder-package/feed)WikiDiscussions main Synced today

READMEChangelog (4)DependenciesVersions (5)Used By (0)

CronBuilder Package
===================

[](#cronbuilder-package)

A dev-only visual builder for cron expressions. Fill in minute/hour/day/month/weekday, and get instantly: the resulting expression, a human-readable description, the next 5 times it would run, and a ready-to-paste `#[Cron(...)]` snippet.

---

Structure
---------

[](#structure)

```
cronbuilder-package/
├── composer.json
├── README.md
└── src/
    ├── NeoCronBuilderPackage.php
    ├── Middleware/
    │   └── DevOnlyMiddleware.php
    ├── Service/
    │   └── CronExpressionCalculator.php
    ├── Controllers/
    │   └── CronBuilderController.php
    ├── Assets/
    │   ├── css/cronbuilder.css
    │   └── js/cronbuilder.js
    └── Templates/
        └── pages/
            └── builder.html.twig

```

---

Dev-only, by design
-------------------

[](#dev-only-by-design)

Every route this package exposes is protected by `DevOnlyMiddleware`, which checks `Config/app.config.php`'s `environment` key. Outside `environment: dev`, every route returns a blocked response. This tool only helps you write cron expressions correctly — it has no reason to ever be reachable on a live site.

---

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

[](#installation)

```
php bin/neo package:require neophp/cronbuilder-package --project=MyProject
```

Register it in the project's `Config/app.config.php`:

```
return [
    // ...
    'packages' => [
        \Vendor\NeoPHP\CronBuilderPackage\NeoCronBuilderPackage::class,
    ],
];
```

No configuration file, no migration.

---

Usage
-----

[](#usage)

Visit `/_cronbuilder/` (only reachable in `dev`):

1. Use a preset (every minute, every hour, every weekday at 9 AM, etc.) or fill in each field manually
2. The expression, its description, and the next 5 run times update automatically as you type
3. Copy the expression, or copy the full `#[Cron(...)]` snippet directly from the code block
4. Paste it into your own class:

```
use Neo\Core\Cron\Attribute\Cron;

#[Cron(expression: '0 9 * * 1-5')]
final class MyScheduledTask
{
    public function handle(): void
    {
        // ...
    }
}
```

This package never writes to your files — it only helps you build the string, exactly like `neo-formbuilder-package` generates code to copy-paste rather than writing it for you.

---

`CronExpressionCalculator`
--------------------------

[](#cronexpressioncalculator)

Also usable directly in PHP, outside the UI:

```
use Vendor\NeoPHP\CronBuilderPackage\Service\CronExpressionCalculator;

$calculator->describe('0 9 * * 1-5');
// "Runs every weekday at 09:00"

$calculator->getNextRuns('0 9 * * 1-5', 5);
// ['2026-08-10 09:00', '2026-08-11 09:00', ...]
```

---

Known limitations
-----------------

[](#known-limitations)

- **Custom-built cron parser, not a full implementation of the cron standard.** It correctly handles `*`, fixed values, ranges (`1-5`), lists (`1,3,5`), and steps (`*/15`) — the vast majority of real-world expressions. It does **not** implement the traditional Unix cron quirk where day-of-month and day-of-week are combined with OR logic when both are restricted (most modern schedulers, including this one, treat them as AND for simplicity and predictability).
- **`getNextRuns()` iterates minute by minute** with a one-year safety cap — fine for interactive use in the builder UI, not intended as a general-purpose scheduling engine for production task execution.
- **Descriptions are limited to a few common patterns** (every N minutes, every day at a fixed hour, every weekday at a fixed hour). Anything else falls back to a literal field-by-field description rather than fully natural language.

---

License
-------

[](#license)

MIT

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance100

Actively maintained with recent releases

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 78.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 ~0 days

Total

4

Last Release

1d ago

### Community

Maintainers

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

---

Top Contributors

[![BenjiLeLoustik](https://avatars.githubusercontent.com/u/212323688?v=4)](https://github.com/BenjiLeLoustik "BenjiLeLoustik (15 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (4 commits)")

### Embed Badge

![Health badge](/badges/neophp-cronbuilder-package/health.svg)

```
[![Health](https://phpackages.com/badges/neophp-cronbuilder-package/health.svg)](https://phpackages.com/packages/neophp-cronbuilder-package)
```

PHPackages © 2026

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