update ranks automatically for specified time and store them in DB