0

I have a shell script running in a while loop. The script accepts a number as an argument so in ps you would see something like /path/to/script.sh 2. Every 180 seconds, it should be spawning a PHP process which runs some code based on the number passed to the shell script. This spawns as a child process and shows up like /path/to/cron.php -r=/Some/method/in/the/php/2 and exits. We are seeing that these processes are not being executed for certain numbers (though I doubt the number itself has anything to do with it).

Does anyone have any ideas for hunting down why the child processes are properly spawning for some and not others?

  • First thought here is that it does get spawned off, but exits prematurely. Perhaps add some logging to the parent script to log what was executed, in order to tie everything together? – Jeff Schaller Apr 23 at 16:19
  • I may just rewrite the parent script containing the "should I execute this script" logic. It's been in place since before my time. – Mike Apr 23 at 16:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.