Kernel.php 991 B

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