Repeat a command at a given interval, and aggregate its output