[wp-trac] [WordPress Trac] #17462: Improve cron locking
WordPress Trac
wp-trac at lists.automattic.com
Mon Aug 22 09:27:36 UTC 2011
#17462: Improve cron locking
--------------------------+--------------------
Reporter: ryan | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.3
Component: Cron | Version: 3.1.2
Severity: normal | Resolution:
Keywords: has-patch |
--------------------------+--------------------
Comment (by GDragoN):
This is really a big problem, especially for tasks that are critical, like
backups. For GD Press Tools Pro plugin I made a in job handler protection
to avoid the problem. First, I set sleep(1), and than check for the
transient value in the database. This value is set to 60 seconds. And for
the most part even if the hook is executed twice by the cron it will still
allow only one process to run. It was OK for a while, and today I have
noticed that this is not really enough, wp-cron.php managed to run same
cron job 4 seconds apart. And that is the big difference for cron data to
remain invalid. I can increase sleep time, to allow for bigger gap, but
that is not really a solution. All cron jobs have the same problem, but
most of them are not that critical.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/17462#comment:13>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list