Kernel.php 3.7 KB

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