Forums

script stops by itself

Hi all, I keep hosted here the python script of my telegram bot. I can't figure out why, at some point the script simply falls asleep and the bot stops responding. Each time I have to restart it, about once a day. I have a logging and debugging system and I don't log errors of any kind. I don't understand if it depends on my plan since I am using the free one.

Any advice?

You're probably running your bot in a console. Consoles arent intended to run processes forever and will eventually stop. For scripts / bots that you'd like to run 24/7 try always on tasks (paid feature) https://help.pythonanywhere.com/pages/AlwaysOnTasks/

Hola, yo tengo el mismo problema, aún con la cuenta de paga, tengo activadas las tareas para algunos scripts que descargan datos meteorológicos, éstos funcionan bien por uno o dos días luego se detienen mostrando esto en consola >>>. Uso la api API gratuita de Open Weather, y si me encuentro dentro del límite de llamadas diarias.

If you want your scripts to keep running, you should run them using an always-on task rather than in a console.

Muchas gracias, ahora funciona.

Great, glad we could help!