Definition and implementation of a task should occur outside of the other standard tasks. It is usually easier to put your task definitions above the other tasks in the same file containing the competition template. Then, call the startTask function for your task inside preautonomous, autonomous, or driver tasks, as appropriate.
I’m doing this on an iPhone with a dodgy connection. Not sure how it will work out.