I have a php console app and Ubuntu server. I'm executing it with this basic command
I want to execute it repetitively, but cronjobs not suitable for me. I want to execute again and again when app.php finish working. It won't be executed every X minutes, it will be executed again immediately when it's finish work (like infinity loop). So i will use bash scripting.
while true; do php app.php done
this will solve my problem. But usage of
while true seems evil. Is it possible to stop this bash script, if i need ? Or can you tell me best way to do this?
(app.php file , fetching a long list of website URLs and fetching their content. It's like a web spider. i will connect to server via ssh , execute bash script with nohup, and then close terminal. )