I have a Scriptcase Blank application that runs a query to get records from a database table. It “processes” these records, then removes them.
This is my “Queue” of what needs to be done.
It works perfectly, the problem I have now is I need it to run this check every 5 seconds. I can not create a CRON job for less than 1 minute interval, not to mention that when it calls this blank application it might run for more than 1 minute and I don’t want two instances of it running.
I have googled solutions but not really found a good solution as it pertains to Scriptcase.
PHP code that checks if the current script is running by its name does not work since all Scriptcase applications are called “index.php”.
I need an always running script, like an infinite loop… I tried doing a SC_redir at the end of my application redirecting back to itself with a 5 second SLEEP command… this works perfectly, but eventually dies… and I need it to run forever.
Can anyone offer a suggestion on how to achieve this?
Thank you for any suggestions!