vendredi 2 novembre 2018

Send alert on only successful schedule run

I have written below code to send data to AWS Lambda function whenever the scheduled job runs. The problem is it sends the alert whenever it fails while running task(). How can I only send alert on successful run?

 $schedule->command('task:send')
            ->hourly()->appendOutputTo(storage_path().'/logs/task.log')
            ->after(function(){
                LambdaHelper::sendHeartbeatLambda("task");
            });



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2F1F1KX
via IFTTT

Aucun commentaire:

Enregistrer un commentaire