Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am running nohup to keep a php script running in the background.

Is there anyway to ensure the process keeps running? Is there a command that can check to see if the process is still running and if not, is there a command that re runs nohup.

As you can guess, I am new to using nohup.

The command I use to start the process:

nohup php htdocs/index.php twitter stream /dev/null &

This is for capturing tweets using twitter's streaming api

share|improve this question
    
Maybe? ps ax | grep my_comm | grep -v || nohup /path/to/my_command & –  Brad Feb 11 at 20:09

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.