In theory the reconnect on disconnect should in theory be the universal method but of course it is true that it does not always work so therefore you would have to write your own script based on it.