I have a python application and I run it using python app.py
but when the machine restart for any reason the application stoped
I searched and I found that I can make it run again using corn jobs
so I installed crontab and add the following code to it
@reboot /home/airnotifier/airnotifier/airnotifier.sh
and this is the code in the file airnotifier.sh
cd /home/airnotifier/airnotifier
python ./app.py
cd airnotifier
python ./app.py
cd /home/airnotifier/airnotifier
python app.py
cd airnotifier
python app.py
as you can see, I tried all combinations to make the application run again
can anyone tell me what did I do wrong?