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

ActiveYii2-extension

hzted123/yii2-cronjobs
======================

Simple and convenient installing console commands as cron jobs for Yii framework

1.0.1(9y ago)03.9k11MITPHPPHP &gt;=5.3.0

Since Jun 19Pushed 9y ago1 watchersCompare

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

READMEChangelog (2)Dependencies (1)Versions (3)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).

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

[](#installation)

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

Either run

```
php composer.phar require hzted123/yii2-cronjobs "*"

```

or add

```
"hzted123/yii2-cronjobs": "*"

```

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

- **Step 2:** Set aliase @runnerScript in console config. This absolutely path to runner script Change path to runner script as your project.

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

```

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

```
'controllerMap' => [
       'cron' => [
           'class' => 'hzted123\cronjobs\CronController',
           'cronJobs' =>[
        	'test/example1' => [
            		'cron'      => '* * * * *',
        	],
		    'test/example2' => [
            		'cron'      => '10 * * * *',
        	],

    	    ],
       ],
   ],

```

- **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
```

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

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

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

Total

2

Last Release

3309d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/071e6041828e1d46589f4e08762acd95dde505e3d847aad95a47f6bf38bb90a1?d=identicon)[hzted123](/maintainers/hzted123)

---

Tags

yii2extensioncronjobs

### Embed Badge

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

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

###  Alternatives

[skeeks/cms

SkeekS CMS — control panel and tools based on php framework Yii2

13825.6k47](/packages/skeeks-cms)[dmstr/yii2-cookie-consent

Yii2 Cookie Consent Widget

1452.6k](/packages/dmstr-yii2-cookie-consent)[richardfan1126/yii2-js-register

Yii2 widget to register JS into view

1357.2k7](/packages/richardfan1126-yii2-js-register)

PHPackages © 2026

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