PHP code example of jdavidbakr / multi-server-event

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

    

jdavidbakr / multi-server-event example snippets


\jdavidbakr\MultiServerEvent\Commands\MultiServerMigrationService::class,

/**
 * Define the application's command schedule.
 *
 * @return void
 */
protected function defineConsoleSchedule()
{
    $this->app->instance(
        Schedule::class,
        $schedule = new \jdavidbakr\MultiServerEvent\Scheduling\Schedule()
    );

    $this->schedule($schedule);
}

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

$schedule->command('inspire')
    ->daily()
    ->withoutOverlappingMultiServer()
    ->ensureFinishedMultiServer(30);

php artisan make:migration:multi-server-event
php artisan migrate