[wp-trac] [WordPress Trac] #42660: Single event scheduler

WordPress Trac noreply at wordpress.org
Wed Nov 22 09:06:57 UTC 2017


#42660: Single event scheduler
-------------------------------+------------------------------
 Reporter:  skarabeq           |       Owner:
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Cron API           |     Version:  4.9
 Severity:  normal             |  Resolution:
 Keywords:  reporter-feedback  |     Focuses:
-------------------------------+------------------------------
Changes (by dd32):

 * severity:  major => normal


Comment:

 Replying to [comment:4 skarabeq]:
 > And when I open https://wptest.dev/wp-cron.php?doing_wp_cron via crontab
 5 times I got 5 executed cron events. It must be only once.

 You're bypassing the cron locks by doing that, and as a result, the cron
 task being fired multiple times is expected.

 The cron should be only triggered by calling `spawn_cron()`.
 If you're using an external trigger for cron tasks by calling the cron url
 directly then you'll need to handle it yourself some other way.

 I'm going to mark the ticket as `invalid` as it sounds like this is purely
 due to you triggering the cron manually, if you can experience cron tasks
 running multiple times, via `spawn_cron()` (Which is what WordPress uses)
 feel free to re-open the ticket with detailed information we can use to
 duplicate it.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/42660#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list