Reputation: 303
TLDR: How to ensure no delay when using WP Post Schedule? When you schedule it at 12pm, it will be published at 12pm on the dot
I am creating a website for a virtual event. Programme itineraries for the event has been created as a CPT using ACF.
On the frontpage, there's a Live Feed section that shows 1 itinerary/post at a time. I use the WP Post Schedule built-in functionality for this purpose. What's happening now is that there is a delay of 20 seconds - 1 minute before these scheduled posts are actually published.
I already have a meta-refresh setup so I hope that helps WP to fire the cronjob without waiting on actual user visit.
I found this but unfortunately it's not working for me, the said #ss isn't present in #timestampdiv
Current Situation
I may have solved the issue above after getting 1 missed schedule earlier and on top of delayed scheduled posts (from 30sec-1min)
is_page()
in the plugin's code.define('WP_MEMORY_LIMIT', '500M');
meta-refresh
time interval from 10 to 20Spoke too soon
Pfft. 2pm post was delayed by 1min. Well, at least it's not a Missed Schedule. Gonna have to go back the drawing board. Probably trying
Final Update
Ditched the WP Cron / Scheduled Post and went with displaying post based on start time - end time instead. oh well!
Upvotes: 0
Views: 319
Reputation: 1126
To run scheduled tasks, WordPress uses a system called WP Cron. The main issue with WordPress cron and the cron scheduler is that wp-cron.php is only executed when a user visits your website and triggers a page load. This means that WordPress requires an HTTP/HTTPS request from your website to run scheduled tasks. The cron task is then queued to be executed.
Therefore its best to to add a server-side Cron trigger for wp-cron.php.
Upvotes: 1