Help me in writing a shell script.sh to run my python service fin_code/final/Healthcheck.py by killing the current running service and run it again... This will be called in crontab to run for every 3hrs...
script.sh
kill -9$(ps grep 'healthcheck.py' | awk '{print $2}')
nohup python fin_code/final/healthcheck.py &
I've used this script to run in crontab.