I am not very good with bash or shell script. I would like to know if what I want to do is possible.
I have a big request to do with PHP. Only when I launch it my server is in Timout (and I can't extend it). I had the idea to split the PHP requests in iterations. Every time I reload my page, my script iterates over a JSON file.
I want to know if I can use a script with a CRON to run my PHP file as long as it has iterations to perform. And if I can use a response from my PHP in my bash to stop the script when everything is finished?
I apologize for my English, thank you for your time. I have searched the web several times, but I can't find an answer to use a php file with a bash script with iterator.
Thanks in advance,
php script.phpAssuming you have a non-infinite loop in your script, it will automatically stop once it finishes everything