add apscheduler and fix ranking