Kernel.php 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <?php
  2. namespace App\Console;
  3. use App\Console\Commands\DeleteDormantMemberCommand;
  4. use App\Console\Commands\ResendEmailsCommand;
  5. use App\Console\Commands\SendDormantTableCommand;
  6. use App\Console\Commands\SendEmailsCommand;
  7. use Illuminate\Console\Scheduling\Schedule;
  8. use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
  9. class Kernel extends ConsoleKernel
  10. {
  11. /**
  12. * The Artisan commands provided by your application.
  13. *
  14. * @var array
  15. */
  16. protected $commands = [
  17. SendEmailsCommand::class,
  18. ResendEmailsCommand::class,
  19. SendDormantTableCommand::class,
  20. DeleteDormantMemberCommand::class,
  21. ];
  22. /**
  23. * Define the application's command schedule.
  24. *
  25. * @param \Illuminate\Console\Scheduling\Schedule $schedule
  26. * @return void
  27. */
  28. protected function schedule(Schedule $schedule)
  29. {
  30. $schedule->command(SendEmailsCommand::class)->dailyAt('00:00');
  31. $schedule->command(ResendEmailsCommand::class)->dailyAt('00:30');
  32. $schedule->command(SendDormantTableCommand::class)->dailyAt('01:00');
  33. $schedule->command(DeleteDormantMemberCommand::class)->dailyAt('02:00');
  34. // $schedule->command(SendEmailsCommand::class)->everyFiveMinutes();
  35. // $schedule->command(ResendEmailsCommand::class)->everyFiveMinutes();
  36. // $schedule->command(SendDormantTableCommand::class)->everyFiveMinutes();
  37. // $schedule->command(DeleteDormantMemberCommand::class)->everyFiveMinutes();
  38. }
  39. protected function scheduleTimezone()
  40. {
  41. return 'Asia/Seoul';
  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. }