PHP code example of madlab / multi-server-scheduling

1. Go to this page and download the library: Download madlab/multi-server-scheduling 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/ */

    

madlab / multi-server-scheduling example snippets



use Illuminate\Contracts\Cache\Repository as Cache;
use madlab\MultiServerScheduling\Schedule as MultiServerSchedule;

/**
 * Define the application's command schedule.
 *
 * @return void
 */
protected function defineConsoleSchedule()
{
	$this->app->instance(
		Schedule::class, $schedule = new MultiServerSchedule(
			$this->app[Cache::class],
			MultiServerSchedule::LOG_LEVEL_ABANDONED
		)
	);

    $this->schedule($schedule);
}

$schedule->command('inspire')
    ->daily()
    ->withoutOverlappingCache();