12 points · by kanzure · 16y ago · 15 comments
The PHP programmers tell me to just do a lazy check on each page load for auctions that are closed- if I do that, I'd probably throw it on to an SQS queue and have some server instance processing the closing auctions in bulk. But what if it's a cold day in hell and nobody is triggering these page loads? etc.
What other solutions are out there for time-sensitive scheduling for arbitrarily large numbers of tasks?
So if it really is just one close out auctions task, why not build a cron job to find all the closed auctions and do what you gotta do in a loop?
It's a simple wrapper over rufus-scheduler and god to create scheduled workers that execute tasks at specific times.
I don't know if I believe this blanket statement. I personally can't imagine a competent PHP programmer, let alone any programmer suggesting this route. While it may be in vogue to bash PHP programmers, it's doubtful that asking this question in #php would produce such a result.
As a matter of fact, you could've just as easily said "The Ruby programmers", or "The Python programmers", since I'm sure there exists a group of programmers using those languages that may think that suggestion is a good idea. Grouping an entire set of programmers into your question is in poor taste.
This is my opinion, as a very competent PHP programmer.
http://github.com/tobi/delayed_job
Not sure of an equivalent in PHP.
If you control the server then the better solution would be to schedule one job that runs every minute or so and executes the task you need.
found this here yesterday -- might be near your needs