Auto event scan using new task scheduler

Same functionality but ported to feature branch using the new task scheduler.