I'm looking for a plugin capable of execute a task (in my case, switch the sticky attibutte of certains) in a specific hour (for example 22:00 hrs), Anyone knows a plugin with those capabilities?

Thanks in advance

link|improve this question

17% accept rate
1  
have you seen, codex.wordpress.org/Function_Reference/wp_cron – Wyck Jun 30 '11 at 5:37
feedback

1 Answer

You don't need a plugin for this, a complete cron system is built into wordpress. If you don't do anything, then wordpress is already running a lazy man's cron job. Which means that it's using your page hits to run the cron as close to your schedule as possible.

Or you can choose to disable the lazy man cron job and setup the wp-cron.php file to run every five minutes with a real cron job. Once that's done, then you can do all of your scheduling within wordpress.

Get started here: http://codex.wordpress.org/Category:WP-Cron_Functions

register_activation_hook(__FILE__, 'my_activation');
add_action('my_hourly_event', 'do_this_hourly');

function my_activation() {
    wp_schedule_event(time(), 'hourly', 'my_hourly_event');
}

function do_this_hourly() {
    // do something every hour
}
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.