Changed scheduler to use PyMongo.