Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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

share|improve this question
1  
have you seen, codex.wordpress.org/Function_Reference/wp_cron –  Wyck Jun 30 '11 at 5:37
add comment

1 Answer 1

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
}
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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