Kernel.php 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?php
  2. namespace App\Console;
  3. use App\Console\Commands\Push\HwPushTest;
  4. use App\Console\Commands\Push\MiPushTest;
  5. use App\Console\Commands\Push\OppoPushTest;
  6. use App\Console\Commands\Push\PushTask;
  7. use App\Console\Commands\Push\PushTest;
  8. use Illuminate\Console\Scheduling\Schedule;
  9. use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
  10. class Kernel extends ConsoleKernel
  11. {
  12. /**
  13. * The Artisan commands provided by your application.
  14. *
  15. * @var array
  16. */
  17. protected $commands = [
  18. MiPushTest::class,
  19. HwPushTest::class,
  20. OppoPushTest::class,
  21. PushTest::class,
  22. PushTask::class,
  23. Commands\Activity\ActivityStats::class,
  24. Commands\BookAdjust::class,
  25. Commands\BookAdjustOne::class,
  26. Commands\BookSpider::class,
  27. Commands\BookUpdate::class,
  28. Commands\BookUpdateOne::class,
  29. Commands\BookTest::class,
  30. Commands\BookAfterSpider::class,
  31. Commands\BookAttr::class,
  32. Commands\YqBook::class,
  33. Commands\channelCpcCode::class,
  34. Commands\updateFromNewYunqi::class,
  35. Commands\CheckOrderStatus::class,
  36. Commands\NewVersionPrepare::class,
  37. ];
  38. /**
  39. * Define the application's command schedule.
  40. *
  41. * @param \Illuminate\Console\Scheduling\Schedule $schedule
  42. * @return void
  43. */
  44. protected function schedule(Schedule $schedule)
  45. {
  46. // 推送任务每分钟执行
  47. $schedule->command('push:task')->everyMinute()->sendOutputTo(storage_path('pushCommand-' . date('Y-m-d')));
  48. // 每天的活动统计
  49. $schedule->command('activity:stats')->dailyAt('01:00');
  50. }
  51. }