Moved SchedulePeriodic to an Extension method to simplify implementation.

SchedulePeriodic now will schedule an action that will reschedule itself to
run after the previous action is ran.