From what I see, Gearman does not support scheduled tasks or task delays. I thought that perhaps the scheduled task can be queued at and then added to the Gearman queue after the expiration of the at time period.
at tasks are permanent because they are written as files to a directory in the server spool directory. Thus, a single bottleneck could potentially be a simple script to add a task to the Gearman queue, because at cannot be distributed between servers. By handing it to Gearman to handle the actual job, I can get the correct logging of work, etc.
This is the best way to approach this, and do you have any alternative ideas?
The reason I chose Gearman over other queue solutions is because it has a PHP extension.
The code I'm writing is used to maintain a queue of emails to be sent. Therefore, I can indicate that I want to send an email to example@example.org at 9.50 on Friday, for example.
linux unix php gearman at-job
Treffynnon
source share