The code should be in a single place, not several places. That'd be like two people trying to type on a keyboard at the same time using the same keys.
It'll interfere with itself otherwise, and the long pauses would disable Teleop.
Periodic Tasks is the right place for a sequence like this.
- Check for start of sequence (joystick)
- Turn motor on/check for reed switch OFF
- Check for reed switch ON
- Turn motor OFF