0

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

1
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
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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