Implemented periodic scheduling, too. Needs testing now.