Kernel.php 846 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. namespace App\Console;
  3. use App\Console\Commands\Apollo;
  4. use App\Console\Commands\Downloads;
  5. use Illuminate\Console\Scheduling\Schedule;
  6. use Laravel\Lumen\Console\Kernel as ConsoleKernel;
  7. class Kernel extends ConsoleKernel
  8. {
  9. /**
  10. * The Artisan commands provided by your application.
  11. *
  12. * @var array
  13. */
  14. protected $commands = [
  15. Apollo::class,
  16. Downloads::class
  17. ];
  18. /**
  19. * Define the application's command schedule.
  20. *
  21. * @param \Illuminate\Console\Scheduling\Schedule $schedule
  22. * @return void
  23. */
  24. protected function schedule(Schedule $schedule)
  25. {
  26. $path = storage_path('logs/'.date('Y-m-d').'-schedule.log');
  27. $schedule->command('download:download')
  28. ->everyMinute()
  29. ->withoutOverlapping()->appendOutputTo($path);
  30. }
  31. }