How to keep something on until?

No how to keep pin, on until something is true