I'm currently developing an Add-on for XenForo which provides an user criteria depended from an external service so that users can be promoted to a special group when this criteria is met.
It works perfectly besides on caveat: runPromotions() looks only at the users which were active in the last two hours. Is there a way to handle the other users?
For example as the criteria is independent of the Forum usage what is the best way to unpromote an user when his criteria became invalid. Or vice versa, promote an user which now met the criteria but wasn't online since over two hours?
I thought about adding a function which goes through all users and checks for the criteria once a day, but this way does not really seem clean to me. Is there a better way I can achieve, maybe there some Function in XenForo with such an intended use case.