PHP code example of notamedia / bitrix-agent-manager

1. Go to this page and download the library: Download notamedia/bitrix-agent-manager library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

notamedia / bitrix-agent-manager example snippets


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.
    }
}