update isValidPriority and implement isValidRepeatedPeriod