So i have created a telegram bot in python.
It is run by its main.py file.
It is running on the server.
But sometimes it stops Due to internet or some minor issue.
Can there be code which can automatically restart the the main.py code on server maybe using Deamonize library.
If Yes,please suggest how to do

Thank YOU
If you are using Linux, you can use crontab
crontab is used for scheduling event
Can we Automatically Restart the Telgram bot(Python) once it is stopped on server using Deamonize or something else?