Configurable retry and wait