Kernel.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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('InventoryDailyLoggingOwner')->dailyAt('08:00');
  29. $schedule->command('FluxOrderFix')->hourlyAt(1);
  30. }
  31. /**
  32. * Register the commands for the application.
  33. *
  34. * @return void
  35. */
  36. protected function commands()
  37. {
  38. $this->load(__DIR__ . '/Commands');
  39. require base_path('routes/console.php');
  40. }
  41. }