Kernel.php 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <?php
  2. namespace App\Console;
  3. use App\Console\Commands\BeforeCreateOwnerReport;
  4. use App\Console\Commands\ClearCancelledOrderTask;
  5. use App\Console\Commands\CreateWeightStatistic;
  6. use App\Console\Commands\FluxOrderFix;
  7. use App\Console\Commands\InventoryDailyLoggingOwner;
  8. use App\Console\Commands\LogExpireDelete;
  9. use App\Console\Commands\MakeServiceCommand;
  10. use App\Console\Commands\SyncBatchTask;
  11. use App\Console\Commands\SyncLogCacheTask;
  12. use App\Console\Commands\SyncOrderPackageLogisticRouteTask;
  13. use App\Console\Commands\SyncUserVisitMenuLogsCacheTask;
  14. use App\Console\Commands\SyncWmsCommoditiesInformation;
  15. use App\Console\Commands\SyncWMSOrderTask;
  16. use App\Console\Commands\TestTemp;
  17. use App\Console\Commands\WasSyncWmsAsnInformation;
  18. use App\Console\Commands\WASSyncWMSOrderInformation;
  19. use Illuminate\Console\Scheduling\Schedule;
  20. use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
  21. use Illuminate\Foundation\Console\ModelMakeCommand;
  22. class Kernel extends ConsoleKernel
  23. {
  24. /**
  25. * The Artisan commands provided by your application.
  26. *
  27. * @var array
  28. */
  29. protected $commands = [
  30. LogExpireDelete::class,
  31. MakeServiceCommand::class,
  32. FluxOrderFix::class,
  33. InventoryDailyLoggingOwner::class,
  34. WASSyncWMSOrderInformation::class,
  35. SyncLogCacheTask::class,
  36. SyncUserVisitMenuLogsCacheTask::class,
  37. TestTemp::class,
  38. SyncBatchTask::class,
  39. SyncWMSOrderTask::class,
  40. SyncOrderPackageLogisticRouteTask::class,
  41. SyncWmsCommoditiesInformation::class,
  42. ClearCancelledOrderTask::class,
  43. WasSyncWmsAsnInformation::class,
  44. CreateWeightStatistic::class,
  45. BeforeCreateOwnerReport::class,
  46. ];
  47. /**
  48. * Define the application's command schedule.
  49. *
  50. * @param \Illuminate\Console\Scheduling\Schedule $schedule
  51. * @return void
  52. */
  53. protected function schedule(Schedule $schedule)
  54. {
  55. $schedule->command('LogExpireDelete')->dailyAt('00:01');
  56. $schedule->command('InventoryDailyLoggingOwner')->dailyAt('08:00');
  57. $schedule->command('FluxOrderFix')->hourlyAt(1);
  58. $schedule->command('WASSyncWMSOrderInformation')->everyMinute();
  59. $schedule->command('syncLogCacheTask')->everyMinute();
  60. $schedule->command('createOwnerReport')->monthlyOn(1);
  61. $schedule->command('createOwnerBillReport')->monthlyOn(1);
  62. $schedule->command('createOwnerAreaReport')->monthlyOn(1);
  63. $schedule->command('beforeCreateOwnerReport')->monthlyOn(1);
  64. $schedule->command('sync:batch')->everyMinute();
  65. $schedule->command('sync:order')->everyMinute();
  66. $schedule->command('syncOrderPackageLogisticRouteTask')->dailyAt('1:20');//同步快递信息到orderPackage
  67. $schedule->command('SyncWmsCommoditiesInformation')->everyMinute();
  68. $schedule->command('clear:cancelledOrder')->everyTenMinutes();
  69. $schedule->command('WasSyncWmsAsnInformation')->everyMinute();
  70. $schedule->command('create:weightStatistic')->dailyAt("00:30");
  71. }
  72. /**
  73. * Register the commands for the application.
  74. *
  75. * @return void
  76. */
  77. protected function commands()
  78. {
  79. $this->load(__DIR__ . '/Commands');
  80. $this->app->extend('command.model.make',function(ModelMakeCommand $base,$app){
  81. return new \App\Console\Commands\MakeModelCommand($app['files']);
  82. });
  83. require base_path('routes/console.php');
  84. }
  85. }