Forums

Python web scraper stops overnight

I have a web scraper that grabs weather data and saves the data to a graph. I keep finding that the scripts stop updating after around a week of running. I have to load the console again for it to start grabbing data again.

Is this something wrong with my code or PythonAnywhere?

Cheers

Hi there, we have to restart consoles every so often for maintenance. The current recommended solution for "always-on" type tasks is to use a scheduled task which can restart itself when it goes down: https://www.pythonanywhere.com/wiki/LongRunningTasks