PHPackages                             yiicod/yii2-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. [CLI &amp; Console](/categories/cli)
4. /
5. yiicod/yii2-cron

ActiveYii2-extension[CLI &amp; Console](/categories/cli)

yiicod/yii2-cron
================

Auto block|unblock console command for the Yii2. One command without duplicate.

1.1.2.1(8y ago)731.5k↓50%3[1 issues](https://github.com/yiicod/yii2-cron/issues)6MITPHPPHP &gt;=7

Since Jul 26Pushed 8y ago1 watchersCompare

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

READMEChangelogDependencies (1)Versions (7)Used By (6)

Yii Cron extension
==================

[](#yii-cron-extension)

[![Latest Stable Version](https://camo.githubusercontent.com/670775870515a23cdec943fb8faf70bc13d022117e03df413f5b23a021daadf2/68747470733a2f2f706f7365722e707567782e6f72672f796969636f642f796969322d63726f6e2f762f737461626c65)](https://packagist.org/packages/yiicod/yii2-cron) [![Total Downloads](https://camo.githubusercontent.com/56a5a6d37acc92fd206f44f52d138dc965abd5dde9ead0b355b7cee09e126125/68747470733a2f2f706f7365722e707567782e6f72672f796969636f642f796969322d63726f6e2f646f776e6c6f616473)](https://packagist.org/packages/yiicod/yii2-cron) [![Scrutinizer Code Quality](https://camo.githubusercontent.com/9bf8ab91d5e7c1eddfa4f209deee43964d03d2845c2c27aabf055e679425fd4d/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f796969636f642f796969322d63726f6e2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/yiicod/yii2-cron/?branch=master)[![Code Climate](https://camo.githubusercontent.com/910b20e04f274c2024736a26298ffd053bd2ec2492c0ddb70a0843fc86e6ae4e/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f796969636f642f796969322d63726f6e2f6261646765732f6770612e737667)](https://codeclimate.com/github/yiicod/yii2-cron)

Provide a logic and functionality to block console commands until they execute. Unlocks commands exhibited at the expiration of the block if the server is down.

#### Usage

[](#usage)

```
public function behaviors()
{
    return array(
        'LockUnLockBehavior' => array(
            'class' => 'yiicod\cron\commands\behaviors\LockUnLockBehavior',
            'timeLock' => 0 //Set time lock duration for command in seconds
        )
    );
}
```

Any command can be converted to daemon

```
class AwesomeCommand extends DaemonController
{
    /**
     * Daemon name
     *
     * @return string
     */
    protected function daemonName(): string
    {
        return 'mail-queue';
    }

    /**
     * Run send mail
     */
    public function worker()
    {
        // Some logic that will be repeateble
    }
}
```

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity32

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

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

Recently: every ~210 days

Total

6

Last Release

3005d ago

PHP version history (2 changes)1.0.0PHP &gt;=5.4.0

1.1.2PHP &gt;=7

### Community

Maintainers

![](https://www.gravatar.com/avatar/7934283ca98b7f31bb5bf13119a8495cad80ac9097125a48792f47caddb588b9?d=identicon)[lexxorlov](/maintainers/lexxorlov)

---

Top Contributors

[![lexxorlov](https://avatars.githubusercontent.com/u/7910574?v=4)](https://github.com/lexxorlov "lexxorlov (6 commits)")[![orlov-alexey](https://avatars.githubusercontent.com/u/95412821?v=4)](https://github.com/orlov-alexey "orlov-alexey (1 commits)")

### Embed Badge

![Health badge](/badges/yiicod-yii2-cron/health.svg)

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

###  Alternatives

[samdark/yii2-webshell

A web shell that allows to run yii console commands and create your own commands.

22981.5k1](/packages/samdark-yii2-webshell)[fedemotta/yii2-cronjob

Yii2 extension to help in the creation of automated console scripts

2233.5k](/packages/fedemotta-yii2-cronjob)[trntv/yii2-tactician

A simple, flexible command bus. This package provide it's integration with Yii2

1458.3k](/packages/trntv-yii2-tactician)

PHPackages © 2026

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