PHP code example of adiafora / laravel-cron-schedule

1. Go to this page and download the library: Download adiafora/laravel-cron-schedule 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/ */

    

adiafora / laravel-cron-schedule example snippets


    composer 

    use Illuminate\Foundation\Console\Kernel as ConsoleKernel;

    use Adiafora\Schedule\Kernel as ConsoleKernel;

    $schedule->call(function () {
        $this->mailService->send();
        sleep(60);
        $this->mailService->send(true);
    })
        ->onCron('longTime')
        ->dailyAt('03:00');

    $schedule->call(function () {
        $this->report->prepare();
    })
        ->dailyAt('03:00');