Kernel.php 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <?php
  2. namespace App\Console;
  3. use App\Console\Commands\Message;
  4. use Illuminate\Console\Scheduling\Schedule;
  5. use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
  6. use Illuminate\Support\Facades\Log;
  7. class Kernel extends ConsoleKernel
  8. {
  9. /**
  10. * The Artisan commands provided by your application.
  11. *
  12. * @var array
  13. */
  14. protected $commands = [
  15. //
  16. Message::class,
  17. ];
  18. /**
  19. * Define the application's command schedule.
  20. *
  21. * @param \Illuminate\Console\Scheduling\Schedule $schedule
  22. * @return void
  23. */
  24. protected function schedule(Schedule $schedule)
  25. {
  26. if (config('app.env') == 'wall') {
  27. $schedule->command('social:sync 2')->everyFiveMinutes();
  28. } else {
  29. $schedule->command('beg:master email')->everyTenMinutes();
  30. $schedule->command('beg:master report')->twiceDaily(1, 13);
  31. $schedule->command('master:meter')->dailyAt('02:00');
  32. $schedule->command('plan:week')->dailyAt('22:00');
  33. $schedule->command('url:check')->dailyAt('23:00');
  34. $schedule->command('num:count')->dailyAt('21:00');
  35. $schedule->command('article:monitor')->dailyAt('8:00');
  36. $schedule->command('message:day')->dailyAt('09:00');
  37. $schedule->command('message:inquiry')->everyMinute();
  38. $schedule->command('link:link')->dailyAt('08:00');
  39. $schedule->command('sync_pictures:template_library')->dailyAt('15:50');
  40. $schedule->command('sync:keyword_expansion')->monthlyOn(1, '01:00');
  41. }
  42. }
  43. /**
  44. * Register the commands for the application.
  45. *
  46. * @return void
  47. */
  48. protected function commands()
  49. {
  50. $this->load(__DIR__ . '/Commands');
  51. require base_path('routes/console.php');
  52. }
  53. }