title: Watchdog for specific python process
body: <p>I am working on Ubuntu 16.04 and I have a python running process in the background</p>
  
  <pre><code>python myFunction.py
  </code></pre>
  
  <p>From time to time, <code>myFunction</code> process gets killed for unknown reason, however, I want to restart it automatically. I have multiple python process running in the background, and I do not know which one runs <code>myFunctions.py</code> (e.g. by using the <code>pgrep</code> command).</p>
  
  <p>Is it possible? Can I make a bash or python script to restart the command <code>python myFunction.py</code> whenever the python process running it gets killed? </p>