shist_iter = schedd.history(
        constraint='CompletionDate > %d' % (now - 600),
        projection=[
            "ProcId",
            "ClusterId",
            "JobStatus",
            "AccountingGroup",
            "AcctGroup",
            "Owner",
            "CompletionDate",
            "CpusProvisioned",
            "JobCurrentStartDate",
            "JobCategory", "JobUniverse"
        ]
)
print("schedd hist query done")
# unfortunately, schedd.history returns a HistoryIterator, unlike Schedd.query which returns a list.  The lines below
# make lists corresponding to the contents of the HistoryIterators, so we can use them more than once.
# unfortunately, schedd.history returns a HistoryIterator, unlike Schedd.query which returns a list.  The lines below
# make lists corresponding to the contents of the HistoryIterators, so we can use them more than once.
print("start iter to list")
shist = list()
for ad in shist_iter:
    shist.append(ad)
print("done iter to listâ)