Using streamconn.run

Is there a way to make streamconn run only once or a predetermined set of times. Or do I have to do what I want inside of getting the minute bars?