I have a python3 script called bot.py which is running a simple (for now) telegram bot, and I can retrieve some PI system states.
It's required to maintain the bot online, so I added next string to
sudo bash /home/pi/piBoxBot/bash/bot_run.sh &
It runs ~/piBoxBot/bash/bot_run.sh:
#!/bin/sh sudo python3 /home/pi/piBoxBot/py/bot.py;
.sh made executable, bot gets up on startup, everything is going fine, works as expected. I noticed that bot just stops after about 8 hours, time after time.
My goal is to have online 24/7. It looks like either a python runtime limitations or raspbian(bash) limits, seems that there is a little option to adjust somewhere. Didn't successfully google the solution, so will be appreciate for any advice.
Thanks in advance.