SHARE
TWEET

Untitled

a guest Sep 19th, 2019 91 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. namespace App\Console;
  4. use App\Console\Commands\HelloCron;
  5. use Illuminate\Console\Scheduling\Schedule;
  6. use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
  7.  
  8. class Kernel extends ConsoleKernel
  9. {
  10.     /**
  11.      * The Artisan commands provided by your application.
  12.      *
  13.      * @var array
  14.      */
  15.     protected $commands = [
  16.         //
  17.     ];
  18.  
  19.     /**
  20.      * Define the application's command schedule.
  21.      *
  22.      * @param  \Illuminate\Console\Scheduling\Schedule  $schedule
  23.      * @return void
  24.      */
  25.     protected function schedule(Schedule $schedule)
  26.     {
  27.         $schedule->command(HelloCron::class, ['--no-ansi'])
  28.             ->everyMinute()
  29.             ->appendOutputTo(storage_path('logs/cron.log'))
  30.         ;
  31.     }
  32.  
  33.     /**
  34.      * Register the commands for the application.
  35.      *
  36.      * @return void
  37.      */
  38.     protected function commands()
  39.     {
  40.         $this->load(__DIR__.'/Commands');
  41.  
  42.         require base_path('routes/console.php');
  43.     }
  44. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top