2017 © Pedro Peláez
 

yii2-extension metodo

Metodo

image

enterdev/metodo

Metodo

  • Monday, January 9, 2017
  • by enter-is
  • Repository
  • 2 Watchers
  • 1 Stars
  • 202 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 7 % Grown

The README.md

Metodo scheduled jobs extension for Yii 2

This extension provides scheduled task capability Yii framework 2.0., (*1)

The extension allows creating repeatable tasks or one-time tasks in the future., (*2)

Metodo is released under the MIT License. See the bundled LICENSE.md file., (*3)

Installation

  1. composer require enterdev/metodo
  2. composer install
  3. yii migrate --migrationPath=@vendor/enterdev/metodo/src/migrations

Usage

Metodo consists of two parts: crons and tasks. Cron is a rule to create tasks, they are used to schedule tasks. Tasks, however, are specific instructions, jobs to be performed. Tasks may or may not have a cron., (*4)

Metodo offers a daemon that runs tasks, but you can also run them manually if you know you're doing., (*5)

Configuration

Add metodo to your config modules, (*6)

    'modules' => [
        'metodo' => [
            'class' => 'enterdev\\metodo\\Module'
        ],
    ]

Running the daemon

run on supervisor or similar type of software:, (*7)

yii metodo/scheduler/daemon

Creating a cron

The simplest cron that creates a task that will run every day:, (*8)

$dailyJob1      = new MetodoCron();
$dailyJob1->tag = 'System';

$dailyJob1->hour   = '0';
$dailyJob1->minute = '0';
$dailyJob1->second = '0';

$dailyJob1->exec_class = 'MockJob';
$dailyJob1->method     = 'job1';
$dailyJob1->save();

see MetodoCronTest.php for more examples, (*9)

The Versions

09/01 2017

dev-master

9999999-dev

Metodo

  Sources   Download

MIT

The Requires

 

The Development Requires

by Evgeny Vihnevich

09/01 2017

1.0.0

1.0.0.0

Metodo

  Sources   Download

MIT

The Requires

 

The Development Requires

by Evgeny Vihnevich