[wp-hackers] REQ: delayed actions for future-dated posts

Scott Merrill skippy at skippy.net
Mon Nov 22 13:54:17 UTC 2004


Here's an interesting project / framework for an enterprising person
to tackle:
   delayed actions for future-dated posts

Ideally I'd like to have a "delayed actions" plugin that gets
executed first in the plugin queue upon posting a new entry.  If
that entry is dated in the future, the "delayed actions" plugin
makes note of which other plugins _should_ have executed, then
immediately drops out to prevent those plugins from actually
executing.

Then, every time a visitor (or aggregator) reads the site, the
"delayed actions" plugin checks its list of posts.  If the date has
passed for any post it knows about, it executes the plugins (in
order, presumably) that _would_ have executed when the post was
saved.

The above probably requires a greater level of cooperation between
the other plugins and the "delayed actions" plugin; so I'll also ask
for a more specific hack, based on my current real world needs:

I have a site that would like to use Seriocomic's Subscriber Plugin
[1].  This site also generally future-dates posts.  As it stands,
the subscribers would get an email at the time the author posts,
even though the post won't be available to read for (potentially)
quite some time.

I'm sure this sort of framework would be wildly useful for a lot of
other scenarios, too.

Thanks!
Scott

1:
http://www.seriocomic.com/rhetoric/posts/2004/07/06/the-one-with-the-subscriber-plugin/

-- 
skippy at skippy.net | http://skippy.net/




More information about the hackers mailing list