Treat them as two independent actions.
Do the .5 sec motor action in Periodic Tasks (here's an
example from last year-note the joystick Get is no longer correct)
Do the while holding action in Teleop (another
example, only implement the button 2 part of this example)