System and server status - continue trying to restart

I have a custom script setup to execute when the given server goes down in Webmin under the ‘system and server status’ section.

However, it only attempts once to restart the server. Is there a way to have it continue to try restarting the service at a given interval? Why does it only do one attempt?

Thanks