[wp-testers] wp_schedule_single_event() acting funny

scribu scribu at gmail.com
Fri Jan 2 21:56:01 GMT 2009


Hello, new to this list.

I was working on a plugin using wp_cron and I noticed some strange
behaviour when using wp_schedule_single_event().

I've written this test plugin: http://wordpress.pastebin.ca/1298571

If I set it to a time in the past, like

  wp_schedule_single_event(time(), CRON_HOOK);

it fires twice on every page load.

If I set it in the future, say

  wp_schedule_single_event(time()+15, CRON_HOOK);

it just fires once, even if I clear the hook first.

Any ideas?

I'm using WP 2.7.1-alpha-10188 on localhost (Ubuntu 8.10 + LAMP).

-- 
http://scribu.net


More information about the wp-testers mailing list