Kernel.php 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. namespace App\Console;
  3. use App\Jobs\ByteDanceSettlementJob;
  4. use App\Jobs\KuaishouSettlementJob;
  5. use Illuminate\Console\Scheduling\Schedule;
  6. use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
  7. class Kernel extends ConsoleKernel
  8. {
  9. /**
  10. * The Artisan commands provided by your application.
  11. *
  12. * @var array
  13. */
  14. protected $commands = [
  15. //
  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('inspire')->hourly();
  26. $schedule->job(ByteDanceSettlementJob::class)->dailyAt('00:00');
  27. $schedule->job(KuaishouSettlementJob::class)->dailyAt('00:05');
  28. }
  29. /**
  30. * Register the commands for the application.
  31. *
  32. * @return void
  33. */
  34. protected function commands()
  35. {
  36. $this->load(__DIR__.'/Commands');
  37. require base_path('routes/console.php');
  38. }
  39. }