def runOnce(self): db = DB() request = [] # DB calls can ve avoided by querying the whole Request Collection for a particular day getTravelRequests = db.getTravelRequest # Replace the dates here from yesterday's date yesterday = date.today() + timedelta(1) # The result here should be added into a file: the order is by hour, minute and initialBusStop request = db.getTravelRequestSummary(datetime.combine(yesterday, datetime.strptime(Fitness.firstMinute, Fitness.formatTime).time()), datetime.combine(yesterday, datetime.strptime(Fitness.lastMinute, Fitness.formatTime).time()))