notamedia/bitrix-agent-manager

This package is abandoned and no longer maintained. The author suggests using the notamedia/console-jedi package instead.

Agent manager for Bitrix

1.0.0-beta 2016-01-06 09:36 UTC

This package is not auto-updated.

Last update: 2019-08-19 09:33:24 UTC


README

Build Status Latest Stable Version Total Downloads License

This module help to create simple workers on the Agents of Bitrix.

Installation

composer require notamedia/bitrix-agent-manager

Usage

Extends abstract class Agent for create your simple workers. For example:

use Notamedia\AgentManager\Agent;

class SimpleWorker extends Agent
{
    protected $recurring = false; // Agent is not recurring.
    protected $parameter;
    
    public function __construct($parameter)
    {
        parent::__construct();
        
        $this->parameter = $parameter;
    }
    
    protected function init()
    {
        // Preparatory operations.
    }
    
    protected function execute()
    {
        // The basic logic of worker.
    }
}

And register your Agent in the Bitrix:

Agents list