add_action to wp cron?

Basically every page load looks to see if there is anything scheduled to run, so by that logic the cron is checked and can possibly run on every page load. I can only presume you want to schedule something to run every so often. If that’s the case you need to look at wp_schedule_event() Below … Read more

Is there a known vulnerability for wp-cron.php?

In wp-includes/default-filters.php we can find a callback registration: // WP Cron if ( !defined( ‘DOING_CRON’ ) ) add_action( ‘init’, ‘wp_cron’ ); If we go the function wp_cron() now, we see this: $schedules = wp_get_schedules(); foreach ( $crons as $timestamp => $cronhooks ) { if ( $timestamp > $gmt_time ) break; foreach ( (array) $cronhooks as … Read more

PHP Warning on fresh install (Connection timed out)

The answer is apparently YES, I should worry. After some research, I’ve found that the warning seems to be related to misconfigurations on the server that WordPress is hosted on (ie. a problem with my server, not WordPress). Common misconfigurations: Server doesn’t have DNS, and so it can’t figure out who “example.com” is, even though … Read more

Do WordPress cron jobs slow down page loading?

Short answer – Nope. Any page request initializes the scheduled queue. It’s just an initialize request. Wp-cron request is a standalone request. so requesting URL /somepage you just initialize request to /wp-cron.php However – If cron event doesn’t work really well (it’s has 1000 db queries e.g. or its requesting a some really long-to-respond resource), … Read more