Run curl until solution is available