Run a recurring job until a condition is met?

hello, how can i run a recurring job until a condition is met inside the method? thanks