add assertion in setRepeatedPeriod