[wp-hackers] Using WP cron from mu-plugins

Harry Metcalfe harry at dxw.com
Thu Aug 23 15:04:21 UTC 2012


We have a plugin in mu-plugins that needs to schedule a wp cron task. 
The recommended way to do this is from an activation hook, but 
(reasonably enough) mu-plugins don't have activation hooks.

The only way around this that I can think of is to have something check 
if the task is scheduled, and if it's not, schedule it. But that means 
we have to check for the task on every request, which sucks.

Does anyone know of a better way to do it?




More information about the wp-hackers mailing list