As pointed out - while loop was never reached. Messed up a variable. but thankfully my main question of what to do instead of this was also answered - Refactor using after to manage recurring tasks. – OysterShucker