I have a python script using websocket. After few hours my websocket connection is sometimes lost and I am not able to capture the disconnection.
I would like my ssh machine reboots every 12 hours and starts again my python script.
Is it the best way to process? How can I do it on a ssh machine?
Can I use
0 */12 * * * sudo reboot
and after automatically start my python script?
/etc/init.das a startup script (don't forget to make it executable)chmod +x /etc/init.d/start_python_script.sh.