Parcourir la source

任务执行成功发邮件

visuddhinanda il y a 4 ans
Parent
commit
d7012c0494
1 fichiers modifiés avec 2 ajouts et 7 suppressions
  1. 2 7
      app/Console/Kernel.php

+ 2 - 7
app/Console/Kernel.php

@@ -19,13 +19,8 @@ class Kernel extends ConsoleKernel
         $schedule->timezone('Asia/Shanghai')
                  ->command('upgrade:daily')
                  ->dailyAt('00:00')
-                 ->onSuccess(function () {
-                    // The task succeeded...
-                    
-                  })
-                 ->onFailure(function () {
-                    // The task failed...
-                 });
+                 ->emailOutputTo('kosalla1987@126.com');
+				 //->emailOutputOnFailure()
     }
 
     /**