This script runs a command up to n times until the exit status is successful.