PHPackages                             denisogr/yii2-cronjobs - 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. denisogr/yii2-cronjobs

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

denisogr/yii2-cronjobs
======================

cronjobs

4737.1k↓32.5%36[7 issues](https://github.com/DenisOgr/yii2-cronjobs/issues)1PHP

Since May 17Pushed 5y ago10 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (1)

Yii2 cronjobs extension
=======================

[](#yii2-cronjobs-extension)

Easiest way to put crontab on your console scripts.

This extension is based on [this](https://github.com/Yiivgeny/Yii-PHPDocCrontab). Thanks [Yiivgeny](https://github.com/Yiivgeny).

But with a few changes:

- Work eith yii2
- Set config in params (not in phpDocs).

I transfer ​​settings of crontab in local settings(params) configuration, so that the application can be run on different servers with different sets of crontab.

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

[](#installation)

- **Step 1:** The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist denisogr/yii2-cronjobs "dev-master"

```

or add

```
"denisogr/yii2-cronjobs": "dev-master"

```

to the require section of your `composer.json` file.

- **Step 2:** Set aliase @runnerScript in console config. This absolutely path to runner script (I can not find another way to get runner script). Change path to runner script as your project (For Yii2 Basic application).

```
Yii::setAlias('@runnerScript', dirname(__DIR__) .'/yii');

```

- **Step 3:** Add to console config:

```
'controllerMap' => [
       'cron' => [
           'class' => 'denisog\cronjobs\CronController'
       ],
   ],

```

- **Step 4:** Add task to system scheduler (cron on unix, task scheduler on windows) to run every minute:

```
* * * * * /path/to/yii/application/protected/yiic cron
```

Usage
-----

[](#usage)

Add in params array with cron sets:

```
'cronJobs' =>[
        'test/example1' => [
            'cron'      => '* * * * *',
        ],
	'test/example2' => [
            'cron'      => '10 * * * *',
        ],

    ],

```

You can point any settings from [this](https://github.com/Yiivgeny/Yii-PHPDocCrontab/blob/master/examples/ExampleRuCommand.php).

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity42

Moderate usage in the ecosystem

Community23

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 88.5% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/739d0be279f6c02ec0c26163cd6f76a93c6604fb98e4c5ab99bd9c46dd770558?d=identicon)[DenisOgr](/maintainers/DenisOgr)

---

Top Contributors

[![DenisOgr](https://avatars.githubusercontent.com/u/1311408?v=4)](https://github.com/DenisOgr "DenisOgr (23 commits)")[![almirb](https://avatars.githubusercontent.com/u/1752962?v=4)](https://github.com/almirb "almirb (1 commits)")[![and800](https://avatars.githubusercontent.com/u/9919211?v=4)](https://github.com/and800 "and800 (1 commits)")[![kafeg](https://avatars.githubusercontent.com/u/2333783?v=4)](https://github.com/kafeg "kafeg (1 commits)")

### Embed Badge

![Health badge](/badges/denisogr-yii2-cronjobs/health.svg)

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

###  Alternatives

[nasyrov/laravel-imgix

Laravel package for generating URLs with Imgix.

1447.5k2](/packages/nasyrov-laravel-imgix)

PHPackages © 2026

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