Kernel.php 3.2 KB

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