Kernel.php 799 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. namespace App\Console;
  3. use Illuminate\Console\Scheduling\Schedule;
  4. use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
  5. class Kernel extends ConsoleKernel
  6. {
  7. /**
  8. * Define the application's command schedule.
  9. *
  10. * @param \Illuminate\Console\Scheduling\Schedule $schedule
  11. * @return void
  12. */
  13. protected function schedule(Schedule $schedule)
  14. {
  15. $schedule->command('password:cleanup')->dailyAt('02:00');
  16. // invia email programmate
  17. $schedule->command('emails:dispatch-due')->everyMinute();
  18. }
  19. /**
  20. * Register the commands for the application.
  21. *
  22. * @return void
  23. */
  24. protected function commands()
  25. {
  26. $this->load(__DIR__ . '/Commands');
  27. require base_path('routes/console.php');
  28. }
  29. }