2017 © Pedro Peláez
 

yii2-extension yii2-cron

Allows to define and execute cronjobs in Yii2 application

image

ladno/yii2-cron

Allows to define and execute cronjobs in Yii2 application

  • Saturday, September 17, 2016
  • by comradefuzz
  • Repository
  • 2 Watchers
  • 0 Stars
  • 2 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Yii2 cron extension

Allows to define and execute cronjobs in Yii2 application, (*1)

Installation

The preferred way to install this extension is through composer., (*2)

Either run, (*3)

php composer.phar require --prefer-dist comradefuzz/yii2-cron "*"

or add, (*4)

"comradefuzz/yii2-cron": "*"

to the require section of your composer.json file., (*5)

Usage

Add cron console controller to your config and define your jobs :, (*6)

    'controllerMap' => [
            'cron' => [
                'class' => 'comradefuzz
                \yii2cron\CronController',
                'crontab' => [
                    ['* * * * *',  'yii app/my-useful-action'],
                    ['* * * * *',  'echo "ONE MORE"'],
                    ['*/5 * * * *',  'echo "Not so fast"'],
                ],
                'log' => true, // Enables logging (default `false`)
                'logCategory' => 'crontab', // Log category (default `crontab`)
            ],
        ]

Then configure your server crontab:, (*7)

* * * * * /path/to/yii cron > /dev/null 2>&1

The Versions

17/09 2016

dev-master

9999999-dev

Allows to define and execute cronjobs in Yii2 application

  Sources   Download

BSD-3-Clause

The Requires

 

by Fuzz

extension yii2 cron