Kernel.php 2.7 KB

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