Avatar ·

Automobile load .py script on Linux

📁 Advanced Python Topics, python3, bots, work

Hello everyone, I bought an Orange Pi to make a server for Telegram bots. I need the bots to start after rebooting the device. I tried many methods, but at least one helped somehow: sudo crontab -e I wrote this:

@reboot python3 /home/orangepi/bots/weather_bot/weather_bot.py & python3 /home/orangepi/bots/echo_bot/main.py &

It seemed to help, but after a couple of hours the bots stopped working. And so it continued: when I rebooted the device, after a couple of hours all the bots become inactive. What should I do?