I have once shell script which check the port status every minute.If the status of port is down then it will send email.But this will send email every minute until port is again up.But I want to send email after 30 minutes from 1st mail sent.How can i do this?I call PHP file from shell script to send mail.
nc -v -z -w 10 192.168.50.34 5038;
$php send_ast_status.php $output $dt
if [ $output == “0” ];
echo ‘asterisk is running’
echo ‘asterisk not running’