Shell script to keep python program running forever

Job ID: 34535120

Budget: $10 – $30 USD

I would like a small script that I can keep running always to check if a python program is still running. If not, it should restart the program. It should check every 2 seconds. This is how I run the python program on Ubuntu 21.04:

nohup python3 -u runMe.py &
Related categories: Python Linux Software Architecture Shell Script Ubuntu