It was accidental but it's a required feature for most of the modern automation tools.
Yesterday I made one automation script job on a remote machine and it will be supposed to run on schedule time at 6 AM. It's also executed but I found failed result and it seems like that issue of internet connection.
I realize that we can add any shell script to check whether the internet up or down but I found that most of the tool do not have this kind of pre-request steps which must be included.
I don't know whether its already included with any tool but here is a request to the community to add your thoughts behind it or share your views if you have any proper solution or suggestions for it.
It is something like below but I am not sure whether any tool applies or not before running any automation scripts/automation job.
if ping -q -c 1 -W 1 mydomain.com >/dev/null; then
echo "The network is up"
echo "The network is down"