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

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

thamtech/yii2-scheduler
=======================

A configuration-driven scheduled task runner for Yii2 applications

v0.5.1(5y ago)72.2k3[1 PRs](https://github.com/thamtech/yii2-scheduler/pulls)MITPHP

Since Jun 8Pushed 3y ago1 watchersCompare

[ Source](https://github.com/thamtech/yii2-scheduler)[ Packagist](https://packagist.org/packages/thamtech/yii2-scheduler)[ RSS](/packages/thamtech-yii2-scheduler/feed)WikiDiscussions master Synced today

READMEChangelog (6)Dependencies (9)Versions (7)Used By (0)

Yii2 Scheduler
==============

[](#yii2-scheduler)

A configuration-driven scheduled task manager for [Yii2](http://www.yiiframework.com).

This is adapted from [webtoolsnz/yii2-scheduler](https://github.com/webtoolsnz/yii2-scheduler)to provide a more configuration-driven approach.

The main differences:

- webtoolsnz/yii2-scheduler
    - automatically picks up Task classes in the `@app/tasks` folder
    - once tasks have been established in the database table, the `active` value from the database controls whether the task is enabled, not the `active`property in the Task class
- thamtech/yii2-scheduler
    - tasks are defined explicitly as part of the scheduler module config
    - the `active` property of the Task instance controls whether the task is enabled (so that it may be controlled programmatically instead of only via the scheduler's databse table)

[![Latest Stable Version](https://camo.githubusercontent.com/75417e4215ce7abcc51511e82bd3a522d16354d65d52338855e3bf662fdac0f3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7468616d746563682f796969322d7363686564756c65722e737667)](https://packagist.org/packages/thamtech/yii2-scheduler)[![Build Status](https://camo.githubusercontent.com/45b8624fbf34173fc8c3704ca87718fd8fd42c6e9031ceb62bfdb0c795c3e410/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f7468616d746563682f796969322d7363686564756c65722e737667)](https://travis-ci.org/thamtech/yii2-scheduler)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/8a95966ba3d8e052b7d1473a93e38e7ff5fae2682b655948a18eeac04f0b6d3a/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f7468616d746563682f796969322d7363686564756c65722e737667)](https://scrutinizer-ci.com/g/thamtech/yii2-scheduler/)[![Code Coverage](https://camo.githubusercontent.com/dc90cab4c4c3ce296bd6f4ce63253ae433a979a76d1ec2d9b867fd9df4af6934/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f7468616d746563682f796969322d7363686564756c65722e737667)](https://scrutinizer-ci.com/g/thamtech/yii2-scheduler/)

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

[](#installation)

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

Install using the following command.

```
$ composer require thamtech/yii2-scheduler
```

Now that the package has been installed you need to configure the module in your application.

The `config/console.php` file (or the equivalent console config file if you are using a different Yii project template) should be updated to reflect the changes below:

```
