Forums

Console keeps crashing

I am currently trying to run a twitter bot on two consoles at the same time (each one tweets on a two-hour interval, meaning the bot tweets every hour).

The code works just fine, and if I run it in my pc it keeps running for however long I want, but for some reason here it doesn't run for very long and I have to restart it basically every day.

I don't know why it is happening because it usually crashes in the middle of the night, and the console doesn't keep track of the errors that happened many hours ago.

I saw a few threads talking about this, but no one really talked about how to fix it, can I get any help? Thanks

Consoles are ephemeral by design. We have Always on tasks for long running jobs. See https://help.pythonanywhere.com/pages/AlwaysOnTasks/