Deleting WordPress pseudo cron jobs
I needed to crate a pseudo cron job in wordpress, but I was not careful and I created >100 jobs. Here is the preview:
I caught this image via GD Press Tools plugin. Now deleting all the cron jobs is not easy even using this plugin. One should click and wait hundred times to delete all the jobs.
It came out that the solution to delete all the cron jobs is possible using this PHP code.
$crons = _get_cron_array();
foreach ($crons as $key=>$job){
if (isset($job['my_hourly_action'])){
unset($crons[$key]);
}
}
_set_cron_array($crons);
After that I checked from the GD Press Tools and found that the unwanted cron jobs are gone.
…
tags: & category: -