It seems you are using your regular cron for that and it seems you are using the WP cron incorrectly in your example above. If you want to use wp cron in anything, this is the basic usage:
if ( ! wp_next_scheduled( 'wpcron_hook' ) ) {
wp_schedule_event( time(), 'hourly', 'wpcron_hook' );
}
add_action( 'wpcron_hook', 'delay_myposts' );
function delay_myposts() {
// put your delay post codes in here
}
Reference: https://codex.wordpress.org/Function_Reference/wp_cron
If in any way that your WP cron is still not firing, this might be in your wp-config.php file
define('DISABLE_WP_CRON', false);
Related Posts:
- Manually set global $post vars with an ID, in order to use template tags
- Show a different number of posts per page depending on context (e.g., homepage, search, archive)
- How to prevent a post from being deleted?
- Limit access to posts/pages by user roles
- What happens when wp_cron is deactivated in WordPress?
- How To Ignore a Filter On Applying Filter the Content In a Function
- Long running action from plugin
- How to get posts by content?
- Custom interval is not working
- WP get_permalink Return Wrong URL
- Fastest way to loop through all posts?
- How to use wp-ajax in wp-cron
- post expire after x days
- Set attached to state
- Use plugin or custom post type for game score functionality
- Tag link suggestion plugin
- Collaborative post submission [closed]
- Bulk Image Uploader to create new post from each image [closed]
- Display comments of users on single page
- Post query – show posts from specified day and month and whole years
- Support for simultaneous editing
- Accessing post’s meta data based on user’s click of a post
- View Private Published Page with URL Code (no login required)
- How to periodically scrape and cache strings from remote txt files. – My First Plugin
- The problem with WordPress Importer
- Hiding posts – WP Hide Post not working
- submit posts by unregistered users in wordpress
- Any built-in function to associate a post to category through a plugin?
- Display post lists in 2nd paragraph
- Matching Chapters to a Custom posts [closed]
- WordPress display breadcrumbs using Yoast plugin [closed]
- Preg Match All doesn’t Allow echo first character for WordPress Taxonomy Tags
- Two problems on my WordPress installation [closed]
- How does task scheduler plugin implements cron that is not dependent on page load request? [closed]
- Excerpts on category page
- How to pull email and name from Flamingo plugin
- Which widget to use for display category post with view more? [closed]
- External RSS feed to WordPress Portfolio
- Automatic plugin updates not working
- how to add text to posts from tags
- Would Gutenberg be considered a PlugIn?
- pagination on data fetched using SQL query
- How to get the first post and second post in a wordpress blog?
- How do I publish portfolio items with a future date?
- WordPress plugin Post Creation [closed]
- Flickering sidebar when scrolling page [closed]
- Where Should i write the code for wordpress ajax voting?
- Switch from wp-cron to a server cron job
- how to execute some code after a post is published in WordPress [duplicate]
- Post status doesn’t update to ‘future’ every time?
- trigger email when post is published by someone a user follows
- Grab ID from post from plugin and use it to create an object
- WP::is_main_query() Not Working
- I would like to remove date display on photo preview
- Embed PDF into wordpress
- Hook Scripts and Styles in WordPress
- WordPress plugin: Getting posts where checkbox selected
- How to auto strip hyperlinks & images in wordpress post
- how can authors to define custom pages?
- WP Editor, save content and category on frontend
- Plugin for TinyMCE to create reference to other posts
- Add posts from other WordPress blog to the current one
- help intercepting save_post through plugin
- Update existing post dates to random dates and time
- i need to make custom cron_schedule with custom interval time as a parameter into a custom payment gateway plugin wordpress
- reminder wp_schedule_event
- .com creates automated link in post
- Is it possible to customize a wordpress post from outside dashboard(Something like site.com/post-type/post/?e=post_id)?
- How to echo a PHP Code After the Content
- WordPress Product Detail and catalog
- WordPress CPT Url metabox collection
- Identify if the_post hook is being called from the admin post list
- How to Save settings of custom tab product page in admin side in a database?
- Displaying friend’s posts only
- Hidden Some Setting on Post or Page [duplicate]
- Better code/text editing for posts and pages?
- WordPress list child pages of custom post type
- Style WordPress Custom Post Type Single Page
- SWF in wordpress post
- Posts are deleted everyday at night
- Plugin Hooks Not Shown in WP Cron Jobs
- Enforce conditions only for draft posts using WyPiekacz, ignore pending and published posts
- Using Postmash plugin in WordPress 3.3.1
- What is the correct method for updating post content from a plugin?
- Get post id in Post Page within Wp-admin
- PHP $_session is not work in wordpress
- Embedding BitBucket Code in Posting
- Next and Previous Pagination button not displaying in WordPress
- Notifications on WordPress Website [closed]
- Sell “create a post”, paid account for post creation
- Looking for membership style plugin with edit option [closed]
- Change from blogger to wordpress
- How to customized post slider layout in elementor wordpress [closed]
- How to export post tags from wordpress
- Show WooCommerce products based on query parameters on redirect
- Getting 400 Error in wordpress website
- is_singular() in mu-plugins not working
- WP galleries in posts after import. How do I do it?
- Difficult case to solve – Select + select = result(related data)
- Randomly display activity posts on home page with buddypress