Given your description, I would start the application with a systemd (since that is what I have on all my machines) .service filestart the application with a systemd (since that is what I have on all my machines) .service file.
In that service file, I would point to a script that wraps your application in a simple while loop. Something like this:
#!/bin/sh while true; do /path/to/your/application done This way, every time your application dies ("times out"), it will restart on its own since the condition for the loop is always true.
This is one approach, and the simplest I can think of, there may be others!