I've created a while loop in a bash script to run a couple of PHP commands. The reason why I've created the while loop is because I can't use cronjobs (I don't want to create a new instance of the bash script while the other one is still running).
Previously I ran the command using screen but it seems eventually my resources were all eating up by this process.
So my question is; what is a good alternative to run the bash script?
Script is similar to:
#!/bin/bash echo "Starting daemon.." while true; do echo "Running runJobs.." cd /var/www/wiki && nice -n 10 /usr/bin/php maintainAll.php maintainwiki runJobs >> /var/log/runJobs.log echo "Sleeping 60 seconds.." sleep 60 done