PurpleTurtleCreative / website

Official WordPress website of Purple Turtle Creative.
https://purpleturtlecreative.com/
1 stars 0 forks source link

WP Cron audit tool in ptc-tools #10

Closed MichelleBlanchette closed 1 year ago

MichelleBlanchette commented 1 year ago

I noticed some leftover cron jobs on production, so I'd like to add a simple tool to report all cron schedules that don't have a hook.

I believe you can just use has_action() to check which cron hooks don't have any registered handlers. The scheduled crons are in get_option( 'cron' ) as seen in the private function __get_cron_array().

MichelleBlanchette commented 1 year ago

Well, that was super easy to implement! 71c5141c666054fbc7e8231ddb4136fbe869a7ba

Interesting findings...

Screenshot 2023-07-16 at 12 16 51 PM