Loop tasks when connected