PHPackages                             fm-labs/cakephp-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. fm-labs/cakephp-cron

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

fm-labs/cakephp-cron
====================

Cron Job plugin for CakePHP

2.2.1(1y ago)1951MITPHPPHP &gt;=8.0

Since Sep 15Pushed 1y ago1 watchersCompare

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

READMEChangelogDependencies (2)Versions (14)Used By (1)

cakephp-cron
============

[](#cakephp-cron)

A Cronjob plugin for CakePHP

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

[](#installation)

```
composer require fm-labs/cakephp-cron

```

Create a custom CronTask
------------------------

[](#create-a-custom-crontask)

```
namespace App\Cron

class MyCronTask implements \Cron\Cron\ICronTask {

    public execute() {
        // ... do some magic ...
        //return new CronTaskResult(false, "Something went wrong")
        return new CronTaskResult(true, "Success")
    }
}
```

Configuration
-------------

[](#configuration)

In your `Plugin.php` or `bootstrap.php`

```
\Cron\Cron::setConfig('my_cron', [
    'className' => \App\Cron\MyCronTask,
    'interval' => 3600, // interval in seconds
])
```

Execute cron tasks
------------------

[](#execute-cron-tasks)

### Via Http / Browser

[](#via-http--browser)

```
# to run a specific task
curl -v https://YOUR_BASE_URL/cron/my_cron

# to run all tasks
curl -v https://YOUR_BASE_URL/cron/all
```

### Via CLI

[](#via-cli)

```
# to run a specific task
./cake cron run my_cron

# to run all tasks
./cake cron run all
```

Password protect cron task execution
------------------------------------

[](#password-protect-cron-task-execution)

```
# to run all tasks
curl -v https://USER:PASSWORD@YOUR_BASE_URL/cron/all
```

Under the hood
--------------

[](#under-the-hood)

- Tasks are statically configured via `Cron` class.
- The `CronController` instantiates the `CronManager`
- The `CronManager` loads configured tasks from `Cron` class and on invokation:
    - Instantiates the cron task class (implementing the `ICronTask` interface)
    - Fires the `Cron.beforeTask` event
    - Executes the cron task
    - Fires the `Cron.afterTask` event

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance37

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity74

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 ~186 days

Recently: every ~150 days

Total

13

Last Release

564d ago

Major Versions

0.3 → 1.0.02023-01-02

1.1.0 → 2.0.02023-03-03

PHP version history (3 changes)0.1PHP &gt;=5.4.16

0.3PHP &gt;=7.2

2.2.0PHP &gt;=8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5556440?v=4)[fm-labs](/maintainers/fm-labs)[@fm-labs](https://github.com/fm-labs)

---

Top Contributors

[![fm-labs](https://avatars.githubusercontent.com/u/5556440?v=4)](https://github.com/fm-labs "fm-labs (54 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/fm-labs-cakephp-cron/health.svg)

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

###  Alternatives

[dereuromark/cakephp-tools

A CakePHP plugin containing lots of useful and reusable tools

338920.1k32](/packages/dereuromark-cakephp-tools)[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)[dereuromark/cakephp-shim

A CakePHP plugin to shim applications between major framework versions.

401.0M11](/packages/dereuromark-cakephp-shim)[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)

PHPackages © 2026

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