PHP code example of wahyurejeki / php-bull-scheduler

1. Go to this page and download the library: Download wahyurejeki/php-bull-scheduler 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/ */

    

wahyurejeki / php-bull-scheduler example snippets




ahyuRejeki\BullScheduler\Queue;

// You can specify any value for Redis that Predis considers valid for the first parameter of Predis\Client
$queue = new Queue('example queue', 'tcp://localhost:6379');
$queue2 = new Queue('another queue', array('redis' => array('host' => 'localhost', 'port' => 6379)));
$queue3 = new Queue('different queue', new Predis\Client());

$job_id = $queue->add(array('data' => 'value'));