[wp-hackers] Can Multiple Simultaneous Cron Instances Be Called ?
casey.bisson at gmail.com
Tue Dec 7 04:49:09 UTC 2010
I struggled with simultaneous execution problems a bit. One solution, I believe, is to use actual unix cron to trigger wp cron, but I turned to mysql named locks. They're quicker to set than a table update and automatically reset after the connection that created them is dropped.
Usage example in one of my plugins here:
On Dec 6, 2010, at 7:55 PM, Otto <otto at ottodestruct.com> wrote:
> In an extremely unlikely case, yes. There is a bit of a race condition
> here. But it's tiny. The spawn_cron() function sets a transient called
> doing_cron which it also checks for. Thus, if two hits launched at
> almost the same moment, one of them will set the doing_cron transient
> first, blocking the other one from continuing. The window for two to
> run at once and both succeed is about as small as possible.
> On Mon, Dec 6, 2010 at 8:53 PM, Raj <lists at krusible.com> wrote:
>> WordPress API's cron feature uses the website traffic to trigger scheduled
>> tasks. Is it possible that multiple instances of cron be triggered
>> simultaneously in a very high trafficked website because all the cron checks
>> pass at the same time?
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers