wait internet came back and send e-mail

Dear friends

I have a script that generate a backup and send a email every day 4:00 AM. Some times the link is down and I did not receive the e-mail.

I would like to improve the sript with a verification like:

If ping 200.223.0.84 response, send e-mail, case not, wait 5 minutes and try again until ping response.

Does some one have any idea how to develop it?

Sorry for bad english

I can look into it later… I’m curious myself.. Not sure what type of error handling there is on sending email


Sent from my iPad using Tapatalk

You may split backup generation and sending email:
Script 1. After backup generetation assign name of created backup to global variable, for example backup2sent.
Script 2. In other script each 5 minutes (or 1 hour or…) test value of backup2sent and if it’s non zero - try send backup via email. If sent was succesful assign zero value to this variable.