change the implementation of PeriodicTimer, the old one fails to schedule the task very often