Update scheduler.py

add stats collector to scheduler.py!!!