Created scheduler for periodic tasks