Kernel.php 675 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. namespace App\Console;
  3. use Illuminate\Console\Scheduling\Schedule;
  4. use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
  5. class Kernel extends ConsoleKernel
  6. {
  7. /**
  8. * Define the application's command schedule.
  9. */
  10. protected function schedule(Schedule $schedule): void
  11. {
  12. // $schedule->command('inspire')->hourly();
  13. //每月24号执行创建表
  14. $schedule->command('create_track_table')->monthlyOn(24);
  15. }
  16. /**
  17. * Register the commands for the application.
  18. */
  19. protected function commands(): void
  20. {
  21. $this->load(__DIR__.'/Commands');
  22. require base_path('routes/console.php');
  23. }
  24. }