Agree with Josh on making this a timer. Also, the approach of iterating over all task sets seems a little brute-force. Can't we just have a boolean that starts as false and that we set to true the first time we actually launch a task?