PHPackages                             elstc/cakephp-cron-jobs - 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. elstc/cakephp-cron-jobs

ActiveCakephp-plugin[Utility &amp; Helpers](/categories/utility)

elstc/cakephp-cron-jobs
=======================

A cron job runner for CakePHP

v3.2.0(3mo ago)85.9kMITPHPPHP &gt;=8.1CI passing

Since Nov 9Pushed 3mo ago2 watchersCompare

[ Source](https://github.com/nojimage/cakephp-cron-jobs)[ Packagist](https://packagist.org/packages/elstc/cakephp-cron-jobs)[ RSS](/packages/elstc-cakephp-cron-jobs/feed)WikiDiscussions cake5 Synced 1mo ago

READMEChangelog (5)Dependencies (5)Versions (11)Used By (0)

A cron job runner for CakePHP
=============================

[](#a-cron-job-runner-for-cakephp)

 [ ![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265) ](LICENSE.txt) [ ![Build Status](https://camo.githubusercontent.com/1e053acb2ce86fa1f56df25cba78a0b3ba3c5a2e9f70f089296ee4fef3b318ea/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6e6f6a696d6167652f63616b657068702d63726f6e2d6a6f62732f63692e796d6c3f7374796c653d666c61742d737175617265) ](https://github.com/nojimage/cakephp-cron-jobs/actions) [ ![Codecov](https://camo.githubusercontent.com/7e0b3d1a8238d475105538a1f35df8d603a7af2f348471ca0f5898823edc14dc/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f6e6f6a696d6167652f63616b657068702d63726f6e2d6a6f62732e7376673f7374796c653d666c61742d737175617265) ](https://codecov.io/gh/nojimage/cakephp-cron-jobs) [ ![Latest Stable Version](https://camo.githubusercontent.com/8d2bea7a9da6f2f8ba97485d92304038091de9613fbf82c92f5e136615f10199/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f656c7374632f63616b657068702d63726f6e2d6a6f62732e7376673f7374796c653d666c61742d737175617265) ](https://packagist.org/packages/elstc/cakephp-cron-jobs)

This plugin is a simple wrapper for [crunzphp/crunz](https://github.com/crunzphp/crunz).

Version Map
-----------

[](#version-map)

CakePHP VersionPlugin VersionBranch5.x3.xcake54.x2.xcake43.x0.3.xcake3Installation
------------

[](#installation)

You can install this plugin into your CakePHP application using [composer](http://getcomposer.org).

The recommended way to install composer packages is:

```
composer require elstc/cakephp-cron-jobs

```

### Load plugin

[](#load-plugin)

Load the plugin by adding the following statement in your project's `src/Application.php`:

```
$this->addPlugin('Elastic/CronJobs');

```

### Generate config file

[](#generate-config-file)

Run `bin/cake CronJobs publish:config` command. The command generates `crunz.yml` in the project `ROOT` directory.

You can configure it with `crunz.yml`, see also

I recommend changing `source:` to:

```
source: vendor/elstc/cakephp-cron-jobs/tasks
```

This makes it unnecessary to specify a directory when using `schedule:run` and `schedule:list` command.

### Register to cron

[](#register-to-cron)

Add your cron schedule using `crontab -e`:

```
* * * * * cd {YOUR-APP-DIR}; bin/cake CronJobs schedule:run vendor/elstc/cakephp-cron-jobs/tasks/

```

Usage
-----

[](#usage)

You can register a scheduled job from the CakePHP event system.

Register to job scheduler in bootstrap\_cli.php using the CakePHP event system:

```
use Cake\Event\Event;
use Cake\Event\EventManager;

EventManager::instance()->on('CronJobs.buildSchedule', static function (Event $event) {
    /** @type \Elastic\CronJobs\Schedule\CakeSchedule $schedule */
    $schedule = $event->getSubject();

    // Add a scheduled command
    $schedule->run('touch tmp/crunz-time-from-event')
        ->description('your job description')
        ->everyDay()
        ->at('09:00');

    // Add a scheduled cake's command
    // such as `bin/cake your_command command_arg1 --command-option --some-opt=value`
    $schedule->runCommand('your_command', [
            'command_arg1',
            '--command-option',
            '--some-opt' => 'value',
        ])
        ->description('your job description')
        ->cron('0 3 * * *');
});
```

`\Elastic\CronJobs\Schedule\CakeSchedule` is a `\Crunz\Schedule` wrapper class. See also: [crunzphp/crunz README](https://github.com/crunzphp/crunz#crunz)

### Show scheduled jobs

[](#show-scheduled-jobs)

```
bin/cake CronJobs schedule:list vendor/elstc/cakephp-cron-jobs/tasks/
```

### Upgrade from CakePHP 3

[](#upgrade-from-cakephp-3)

crunzphp/crunz updated from 1.12 to 2.x (&lt;= PHP 7.3), 3.x (&gt;= PHP 7.4). See also crunz's Upgrade Guide.

[crunz/UPGRADE.md at master · crunzphp/crunz](https://github.com/crunzphp/crunz/blob/master/UPGRADE.md)

###  Health Score

51

—

FairBetter than 96% of packages

Maintenance82

Actively maintained with recent releases

Popularity27

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

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

Recently: every ~569 days

Total

7

Last Release

93d ago

Major Versions

v0.3.0 → v2.0.02022-12-02

v2.0.0 → v3.0.02024-05-01

PHP version history (3 changes)v0.1.0PHP &gt;=5.6

v2.0.0PHP &gt;=7.2

v3.0.0PHP &gt;=8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/a3fe494e51e33958f5c8079669fd036dfee4c2e6b11f85f2249ba36c371986e3?d=identicon)[nojimage](/maintainers/nojimage)

---

Top Contributors

[![nojimage](https://avatars.githubusercontent.com/u/100564?v=4)](https://github.com/nojimage "nojimage (33 commits)")

---

Tags

cakephpcakephp-plugincronschedulescheduler

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/elstc-cakephp-cron-jobs/health.svg)

```
[![Health](https://phpackages.com/badges/elstc-cakephp-cron-jobs/health.svg)](https://phpackages.com/packages/elstc-cakephp-cron-jobs)
```

###  Alternatives

[markstory/asset_compress

An asset compression plugin for CakePHP. Provides file concatenation and a flexible filter system for preprocessing and minification.

3761.0M11](/packages/markstory-asset-compress)[cakedc/cakephp-phpstan

CakePHP plugin extension for PHPStan.

40676.6k31](/packages/cakedc-cakephp-phpstan)[dereuromark/cakephp-dto

A CakePHP plugin for generating immutable Data Transfer Objects with full type safety

2988.9k3](/packages/dereuromark-cakephp-dto)[dereuromark/cakephp-geo

A CakePHP plugin around geocoding tools and helpers.

51174.9k4](/packages/dereuromark-cakephp-geo)[cakedc/enum

Enumeration list Plugin for CakePHP 5

30222.5k2](/packages/cakedc-enum)[josegonzalez/cakephp-environments

CakePHP plugin to handle environments-level configuration

4785.9k](/packages/josegonzalez-cakephp-environments)

PHPackages © 2026

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