Limit query
-
The SELECT query should include
post_date <= NOW()clause to limit results to missed scheduled posts only, not all future posts.This makes STRETCH unnecessary.
Or if you insist on STRETCH functionality, we should add
post_datefield to SELECT and compare to current time inforeach ($scheduled_posts as $post_id)loop, to prevent fetching all future posts whichcheck_and_publish_future_postdoes.
The topic ‘Limit query’ is closed to new replies.