Ali Khan
Ali Khan

Reputation: 67

Delete all pending scheduled cron jobs

I need help with deleting scheduled action. Right now there are 21000+ Pending actions and I want to remove all of them. I'm seeing these pending tasks by using "Advance Cron Manager" WP plugin. I can clear cron job in WP_OPTION table but these job are not stored there. I asked the developer, since it's a free plugin so they only said "Use wp_unschedule_event function to clear them."

I've tried clearing cron jobs from wp-options table but those pending actions are not clearing.

Need help running wp_unschedule_event to clear all of those pending tasks Thanks

Upvotes: 0

Views: 5397

Answers (2)

anittas joseph
anittas joseph

Reputation: 41

  1. Use this hook to unschedule all previously scheduled cron jobs.

    <?php wp_clear_scheduled_hook( $hook, $args ); ?>
    
  2. Try

    In SQL: Update wp_options SET option_value = '' WHERE option_name ='cron'

    In wordpress: update_option('cron','');

Upvotes: 0

Arvind Singh
Arvind Singh

Reputation: 1

why don't you disable wp-cron.php file? Simply paste this code in your wp-config.php file and no scheduled task works after you disable the cron file.

define('DISABLE_WP_CRON', true);

How to Disable the wp-cron.php File for Your WordPress Site Using cPanel

Upvotes: -2

Related Questions