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");
});
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire