Since you are doing this in both cases, you may as well do it before the if statement and then only create a new one if the repeat interval is greater than zero.