Move a servo on signal

Hi,

I want a servo that starts moving when a signal is true. Normally I would use the OnSignal(signal) method but because the servo works with time this doensn’t work. Is there another way so I can start a servo movement signal based?

def OnRun():
  while True:
    triggerCondition(lambda: getTrigger() == booleanSignal and booleanSignal .Value == True)    
    # Do servo motion here

comp = getComponent()
booleanSignal = comp.findBehaviour("BooleanSignal")