3

I notice that the documentation for wp_schedule_single_event mentions the following:-

The action will fire off when someone visits your WordPress site, if the schedule time has passed.

However this does not seem to be true for scheduled posts. I notice that some posts can be missed if wp-cron is not run for a while (not sure of exact timeframe). The post then has the label 'Missed Schedule' in the admin panel.

My questions are:-

Is this just for scheduled posts or all scheduled events?

What is the timeframe in which wp-cron must be run before scheduled post are missed?

Where is this timeframe set in the code? I cannot seem to find it in wp-cron.php, cron.php or post.php.

1 Answer 1

0

Not sure the exact answer but I have a theory that it is a 24 hour window. You can get around relying on wp-cron and someone visiting your site every day by having your server handle your cron. Assuming you have cpanel, it's fairly easy to do.

Then just have this run every 12 or 24 hours. By disabling wp-cron, you also reduce a little load on your server, as otherwise, wp-cron will ask if it has jobs to do, every single time a page is loaded.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.