restart program every x minutes?
Solution 1:
You can try doing in your crontab
:
crontab -e
then
11 */3 * * * /usr/bin/pkill -f appli_name; /path/to/appli_name & &>/dev/null
The crontab
command mean :
- every 3 hours
- kill appli_name
- start appli_name in background
Solution 2:
I suggest you to configure Supervisor for your task. It can monitor the process, restart if it fails, also provides output redirection and other nice features. See the example for program to get started.