PHPackages                             egorspk/yii2-scheduler - 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. egorspk/yii2-scheduler

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

egorspk/yii2-scheduler
======================

Yii2 scheduler module

1.0.3(7y ago)12.2k↓43.6%2MITPHP

Since May 30Pushed 7y ago1 watchersCompare

[ Source](https://github.com/egor-spk/yii2-scheduler)[ Packagist](https://packagist.org/packages/egorspk/yii2-scheduler)[ RSS](/packages/egorspk-yii2-scheduler/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (5)Versions (5)Used By (0)

Yii2-scheduler
==============

[](#yii2-scheduler)

Cron task scheduler module for yii2. Features:

- Task management (creation, modification, deletion);
- Manually launch tasks or run tasks on a cron schedule;
- Tracking the results of tasks;
- Ajax user interface.

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

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/). Either run:

```
composer require egorspk/yii2-scheduler

```

or add

```
"egorspk/yii2-scheduler": "^1.0"

```

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

Subsequently, run

```
yii migrate/up --migrationPath=@vendor/egorspk/yii2-scheduler/migrations

```

in order to create the required tables in your database.

Usage
-----

[](#usage)

1. Add this to your web and console configuration modules array:

```
'modules' => [
  'scheduler' => [
      'class' => 'spk\scheduler\Module'
    ],
   ...
],

```

2. Next, add this line to your crontab file:

```
*/5 * * * * cd /project_path/; /php_path/php yii scheduler/run

```

Where:

- /project\_path/ - path to your yii2 project (for example, /var/www/yii/);
- /php\_path/ php - path to php (for example, /usr/bin/php).

### Settings (web config)

[](#settings-web-config)

- defaultFolder - path to the folder, where the methods of classes that can be used as a task (default value: @app/models);
- folderDepth - depth of class methods search by defaultFolder path (defaut value: 0).

Configuration example:

```
'modules' => [
  'scheduler' => [
      'class' => 'spk\scheduler\Module',
      'defaultFolder' => __DIR__ . '/../models/scheduler',
      'folderDepth' => 0
    ],
   ...
],

```

Tasks (methods)
---------------

[](#tasks-methods)

The method must return a value of type bool. True - the task succeeded.

All calls *echo* statement will be written in the log of the task.

User interface
--------------

[](#user-interface)

The user interface is divided into 3 tabs:

- Task list;

[![Task list](img/task_list.png)](img/task_list.png)

- Add/Edit task;

[![Add/Edit task](img/add-edit_task.png)](img/add-edit_task.png)

- Task execution log.

[![Logs](img/logs.png)](img/logs.png)

Note
----

[](#note)

- *img* folder is needed only for README.md;
- file *scheduler.mwb* - database project for the MySQL Workbench program.

License
-------

[](#license)

MIT

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity66

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

Total

4

Last Release

2612d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3701a651a7e0a5af20fa8f451c2a9171b4143a3619ae31201297e1f389602311?d=identicon)[spk](/maintainers/spk)

---

Top Contributors

[![egor-spk](https://avatars.githubusercontent.com/u/4163969?v=4)](https://github.com/egor-spk "egor-spk (10 commits)")

---

Tags

schedulercronyii2crontab

### Embed Badge

![Health badge](/badges/egorspk-yii2-scheduler/health.svg)

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

###  Alternatives

[skeeks/cms

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

13825.8k59](/packages/skeeks-cms)[webtoolsnz/yii2-scheduler

A scheduled task runner for Yii2 applications

1884.0k](/packages/webtoolsnz-yii2-scheduler)[gofmanaa/yii2-crontask

yii2 cron task manager

1012.6k](/packages/gofmanaa-yii2-crontask)[glooby/task-bundle

Scheduling of tasks for symfony made simple

3216.4k](/packages/glooby-task-bundle)

PHPackages © 2026

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