print>>sys.stderr,"ERROR: bibsched seems to run with pid %d, according to %s."%(pid,pidfile)
print>>sys.stderr," Please stop bibsched before running this procedure."
sys.exit(1)
ifenable_recstruct_cache:
print">>> Searching records which need recstruct cache resetting; this may take a while..."
all_recids=intbitset(run_sql("SELECT id FROM bibrec"))
good_recids=intbitset(run_sql("SELECT bibrec.id FROM bibrec JOIN bibfmt ON bibrec.id = bibfmt.id_bibrec WHERE format='recstruct' AND modification_date < last_updated"))