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.

Hi I am using a plugin to view the cron jobs that are run by wordpress. I am noticing that there are jobs related to plugins I have deactivated and even deleted. Why is this so and how can I remove them?

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

This might be because the plugins you were using didnt deregister the crons it setup. To remove the crons use the following code in your functions file:

add_action("init", "clear_crons_left");
function clear_crons_left() {
    wp_clear_scheduled_hook("cron_name");
}

Once thats run once you can safely remove it

share|improve this answer
    
Tried this out but it crashed my wp, removed it now and the crons are still there. –  drtanz Jul 19 '11 at 10:17
    
You have accepted this answer? I presume you figured out the issue you were having? –  Brady Jul 19 '11 at 10:28
    
no sorry I still cannot get it to work. I replaced –  drtanz Jul 19 '11 at 10:33
    
No sorry I replaced 'cron_name' with the name of the cron job but when I save the functions file and refresh the page WP crashes. Maybe I am doing something wrong. –  drtanz Jul 19 '11 at 10:34
    
oops sorry missed a ; off the end of the line. try the code again. –  Brady Jul 19 '11 at 10:40
show 3 more comments

You are seeing jobs that are related to plugins that were deactivated because its a badly coded plugin which should have cleared the scheduled job when it was deactivated,

any way you can uncshedule them using wp_unschedule_event.

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.