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

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

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 2d 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 57% 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

3359d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/494703?v=4)[hzted123](/maintainers/hzted123)[@hzted123](https://github.com/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

[craftcms/cms

Craft CMS

3.6k3.6M2.9k](/packages/craftcms-cms)[samdark/yii2-webshell

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

22585.3k2](/packages/samdark-yii2-webshell)[toriphes/yii2-console-runner

Runs console command in yii web application

29251.3k](/packages/toriphes-yii2-console-runner)[fedemotta/yii2-cronjob

Yii2 extension to help in the creation of automated console scripts

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

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

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

PHPackages © 2026

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