def METHOD_NAME(self, trigger: BaseTrigger) -> None:
    """
    Change the trigger being used by this task.
    Args:
        trigger: The new Trigger to use
    """
    self.trigger = trigger
    self.restart()