Kernel.php 2.5 KB

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