Kernel.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. \App\Console\Commands\MakeServiceCommand::class,
  17. \App\Console\Commands\FluxOrderFix::class,
  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('LogExpireDelete')->dailyAt('00:01');
  28. $schedule->command('FluxOrderFix')->hourlyAt(6);
  29. }
  30. /**
  31. * Register the commands for the application.
  32. *
  33. * @return void
  34. */
  35. protected function commands()
  36. {
  37. $this->load(__DIR__ . '/Commands');
  38. require base_path('routes/console.php');
  39. }
  40. }