Running grunt task multiple times until it fails
问题 What is the canonical way to run the same grunt task continuously, multiple times until it fails? I'd like to keep the question generic, but here is a specific use case: We have a huge set of end-to-end tests written in Protractor which we run via grunt with the help of grunt-protractor-runner and grunt-contrib-connect. What we'd like to do is to keep the connect task running (the web-server serving from a dist directory) while looping over the protractor until it fails (or/and up to N times)