Probably the wrong forum for this question.
My guess would be that you need to add some sort of check to see if the site is up before running the refresh.
What is meant by having the site down?
What kind of script is this?
If it's a batch script:
Use that and loop through a text files of entries to try to connect to.
Or you could probably do everything in a PL/SQL stored procedure if links are setup. Having little idea what is in those SQL scripts I can't say whether or not this would be a good idea.
There it would be a matter of testing the link by querying dual through the link and handling the particular exception(s) of a bad link properly.
It would also reduce dependency on several script files.
Looping through the instances would also probably be easier through a procedure.