• net

    (@krstarica)


    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_date field to SELECT and compare to current time in foreach ($scheduled_posts as $post_id) loop, to prevent fetching all future posts which check_and_publish_future_post does.

The topic ‘Limit query’ is closed to new replies.