I am trying to run the below script with the four chunks referencing four other scripts; LIBERTY, TRA, GTS, and SOPI. The issue I have is a single script might run into an error but will clear once run again.
Is there a way to make a loop to run a max of 3 times for each chunk? For each chunk and not as a whole. If an error is received three times, for that chunk/outside script, it will provide an error.
The code,
import os
# Call on each scraper script to run
# LIBERTY
os.chdir("S:\Supply\Risk Management\Daily auto downloads\Storage\LIBERTY")
exec(open('LIBERTYScraper.py').read())
# TRA
os.chdir("S:\Supply\Risk Management\Daily auto downloads\Storage\TRA")
exec(open('TRAScraper.py').read())
# GTS
os.chdir("S:\Supply\Risk Management\Daily auto downloads\Storage\GTS")
exec(open('GSIScraper.py').read())
# SOPI
os.chdir("S:\Supply\Risk Management\Daily auto downloads\Storage\SOPI")
exec(open('SOPIScraper.py').read())
# Finish statement
print("Scraper data pulls have been completed.")