onExecute

public final ListenerCommand onExecute(Runnable action)

Returns a ListenerCommand that runs the specified action whenever this command updates.