Kernel.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php
  2. namespace App\Console;
  3. use App\Console\Commands\IntegralCommand;
  4. use App\Console\Commands\RanksCommand;
  5. use App\Console\Commands\SearchWdOrderCommand;
  6. use GuzzleHttp\Client;
  7. use Illuminate\Console\Scheduling\Schedule;
  8. use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
  9. use Illuminate\Support\Facades\Crypt;
  10. class Kernel extends ConsoleKernel
  11. {
  12. /**
  13. * The Artisan commands provided by your application.
  14. *
  15. * @var array
  16. */
  17. protected $commands = [
  18. RanksCommand::class,
  19. SearchWdOrderCommand::class,
  20. IntegralCommand::class
  21. ];
  22. /**
  23. * Define the application's command schedule.
  24. *
  25. * @param \Illuminate\Console\Scheduling\Schedule $schedule
  26. * @return void
  27. */
  28. protected function schedule(Schedule $schedule)
  29. {
  30. // $schedule->command('inspire')
  31. // ->hourly();
  32. // $schedule->command('SearchWdOrderCommand')->everyMinute();
  33. // $schedule->command('SearchWdOrderCommand')->everyFiveMinutes()->withoutOverlapping();
  34. // $schedule->command('RanksCommand')->everyFiveMinutes();
  35. // $schedule->command('IntegralCommand')->dailyAt('15:20');
  36. }
  37. /**
  38. * Register the commands for the application.
  39. *
  40. * @return void
  41. */
  42. protected function commands()
  43. {
  44. $this->load(__DIR__.'/Commands');
  45. require base_path('routes/console.php');
  46. }
  47. }