[wp-trac] [WordPress Trac] #43350: REST API: Support for WP Cron

WordPress Trac noreply at wordpress.org
Thu Mar 22 17:44:48 UTC 2018


#43350: REST API: Support for WP Cron
-----------------------------+------------------------------
 Reporter:  bhubbard         |       Owner:
     Type:  feature request  |      Status:  new
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  REST API         |     Version:  trunk
 Severity:  normal           |  Resolution:
 Keywords:                   |     Focuses:  rest-api
-----------------------------+------------------------------

Comment (by schlessera):

 Properly supporting scheduled events through the REST API would only make
 sense of:

 1. They are treated as a resource, complete with CRUD methods.
 2. They have some usefulness in client-side code.

 The second point is the more complicated one. However, this might be
 feasible if we would have a smart callback on the PHP side that transports
 triggered events through the Heartbeat API into the client-side JS space.
 This way, WordPress Core could take care of mapping PHP events to JS
 events, and you could then hook a JS callback to such an event.

 The question is what to do with such events if the JS callback is not
 loaded yet. They could be stored, but that would not scale in case there
 is a general issue and the store quickly fills up.

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


More information about the wp-trac mailing list