Background/problem description:
I'm not even sure how to search for what I want to do. I have a queue of items that need to be processed, and I want PHP to check every 10 seconds (or whatever increment) to see if there is anything in the queue. If there is, it should begin processing it, but only if it isn't already processing another item (so, when processing takes 30 seconds, for example, it wouldn't have more than one item being processed). I think I can hack an 'already processing' flag with the existence of a lock file or something.
I'm probably going to be using AWS SQS for the queue, and have multiple servers running in parallel
The question:
Basically, the user needs to queue up a bunch of work to be done asynchronously. So my question is, how do you schedule PHP to do queue checking? I was looking at cronjobs, but those seem to only be capable of running every minute.