I am wondering if someone might point me in the right direction. I've got little experience working with the Linux command line and recently due to various factors in work I've been required to gain knowledge.
Basically I have two
php scripts that reside in a directory on my server. For the purposes of the application these scripts must be running continuously. Currently I implement that this way:
nohup sh -c 'while true; do php get_tweets.php; done' >/dev/null &
nohup sh -c 'while true; do php parse_tweets.php; done' >/dev/null &
However, I've noticed that despite the infinte loop the scripts to stop periodically and I'm forced to restart them. I'm not sure why but they do. That has made me look into the prospect of a
CRON job that checks if they are running and if they are not, run them/restart them.
Would anyone be able to provide me with some information on how to go about this?