I built a web scraper that would scrape multiple websites for data, problem is that the data is very large and takes like 8 hours to scrape(with the use of sleep don't want to bother their servers too much).
Well, the cloud service I want to host it on will only run it for 6 hours before killing the script so Im making it so that it picks up where it left off when restarted. How do I ensure a clean exit of the code when the cloud service kills it? I don't want anything unexpected to happen to the data.