With WP CLI I was able to avoid other plugins potentially interfering with publish_future
post.
Below is a perl fragment. On my host webdir is $HOME/public_html
and bindir is /usr/bin
. Note the use of --due-now
. Only those hooks currently waiting to be fired will run. Also note you either need to cd
into webdir or add --path=path
, where path is the path to the wordpress files (usually webdir).
# Post any scheduled posts ready to publish
my $cmd = "cd <webdir>; <bindir>/wp cron event run publish_future_post --due-now;
system($cmd);
# Run other cron events normally
$cmd = "cd <webdir>; <bindir>/php wp-cron.php";
system($cmd);
Then I set the script to run at 1,31 in my system cron as all posts either are scheduled for the top of the hour or the bottom of the hour.
Related Posts:
- How to prevent posts from being published too close to each other?
- Immediately published posts are scheduled and published 2 hours later
- All WordPress scheduled posts are being published immediately
- Unschedule a post
- Scheduled posting not working
- How to switch wordpress post status between publish and schedule in MySQL?
- Update Modified date when scheduled posts get published
- Scheduling posts via sql
- Create blog post from external source and set publication date
- How to prevent people from seeing an attachment to a scheduled post that’s released in future?
- How to automatically generate a unique random slug
- How does filter the_posts work?
- Querying post from a multisite network
- Publish pending article from front end with a button?
- Invalid Post Type error when attempting to filter and Bulk Edit posts
- How can I export WordPress posts’ attachments?
- Only display posts with comments
- How to update all post at once?
- Working Bootstrap Carousel Conversion to WP – Technical Questions
- Force update all posts in custom post type, no content changes
- Add custom field to category of custom post type
- How to Customize number of blog posts on first page?
- Load posts into sidebar and paginate via ajax?
- How to intercept Post Title on Post-Save
- Advanced Custom Fields – Storing array value for further usage
- Sort posts by newest child while keeping hierarchy intact
- Custom Theme Want To Remove One Category From All Displays
- Instead of submiting an entire post, is there any way to submit a lite-post or a simple message?
- How do I use Ajax to show the new posts realtime, on the frontpage
- Allow anonymous users to post to my site for moderation
- How Can i Get 5 Recent Post Title With Corresponding Link?
- WP_Query posts_per_page ignored
- Easy way to delete 70k posts and attached media?
- wp_query ‘s’ parameter does not work with custom post type
- How to filter posts that belong to a specific category only if that is the only category
- The short content by characters [duplicate]
- Most recent post from another database
- Hiding Posts on Front Page and from all plugins
- Display posts with tag that matches current post title
- post_content sanitization / transformation process
- wp_insert_post – duration
- How to create a post using REST API with sending data as a JSON body?
- Recent Post Added To Menu Shows Ghost Post With No Title
- How to access $post from a callback function
- How can i limit the number of posts created per category?
- Pagination with an array of post objects?
- Removal of Media Gallery pictures
- Visual (non-HTML) display of post revisions [closed]
- How can I hide tags on a child-category page, if that tag has not been used?
- One post on my website is going to a 404 page
- How can I get a table with the number of published posts by date?
- An array of latest wp_titles
- posts not showing on index.php
- “about us”, ” contact” sections should be article(post) or page in the simple small Business website?
- Page template is accessing the incorrect posts?
- Is it possible to use WP_Query to only pull posts with attachments?
- disable Tab post on nav-menus page (Admin)
- Second get_permalink inside loop points to wrong URL
- How to make the home screen of my blog not show full posts?
- Best Way to Add UnEditable HTML to Posts
- Use Click Image to Play Youtube Video in a WordPress Loop
- Manage Private Posts
- Stop wordpress from creating empty/null entries
- How to get the old WordPress Draft Editor view back with the Word count?
- Force a specific template as default
- Updating post meta for checkbox
- How to make Link to go on the first post
- How do I switch css class on post
- Remove subcategory slug from url
- Site/Post preview is not working on all social media
- Add a field in my rest api
- Posting to WP via URL
- Getting image data from phone camera (MediaDevices.getUserMedia) into user post
- Prevent a post with a specific ID from being created
- Template with ACF and Pagebuilder
- “read more” redirects to the wrong page
- Posting or Updating Article Fails on WordPress [closed]
- delete post hook not being fired when deling in wordpress dashboard admin
- New blog post published notification – Buddypress
- Manipulate query to show specific post
- Show posts from last 3 years in posts page
- My custom query is displaying random posts in random order
- Output wp_link_pages as raw url
- Send Newsletter-Email when post changes
- Display the latest post from some selected authors
- Add custom class to existing menu items from custom meta
- Post Publish Metaxbox on a Front End Page
- Have latest post and recent posts display differently
- Multiple loops on a Search result page?
- WP_Query: Fetch posts that are in (category1 and not in category2), OR posts that are not in cagegory1
- How do I display a full post, not just an excerpt?
- How to get override the WP Admin Syndication feed limit for a custom feed?
- Redirecting to a post based on a GET parameter and a custom field
- Stop Authors from submitting spam post
- Simple method to generate posts from files
- Adding Count Post in Page
- How add class the_content();?
- Title displaying multiple times
- Published posts counter [closed]
- Simple shortcode to check if a user has commented on a certain post