WP-Cron is not a guaranteed time task scheduler. The trigger for WP-Cron is somebody visiting the site itself, so if nobody visits the site at midnight, then the job doesn’t run until somebody does visit the site later.
Similarly, if you use a whole page caching mechanism like WP-Super-Cache, then anonymous users will not really be “visiting” the site since they’re getting cached pages. So that can impact WP-Cron’s ability to run on time as well.
If you need to run timed events precisely, then you need to use a real cron mechanism instead.
Related Posts:
- How do I log plugin (cron) actions?
- Cron firing my function everytime wp-admin is visited
- How Do I Make WordPress Run an Event Every Day?
- get_posts / WP_Query Memory size of 134217728 bytes exhausted
- Hourly WP schedule, do I need at least 1 visitor hourly?
- Change of query var in pre_get_posts not maintained
- Is it possible to load plugin from console with core ?
- Is there any background process that I can run from plugin without depending on page hits on a website without affecting page-load speed?
- WordPress cron running twice
- Will cron job run if page loaded is being served from cache?
- Loading WordPress Admin Environment
- How to schedule a cron job in plugin without waiting for page load request?
- Problems with cron
- How to Trigger WP CRON at Local Timestamp?
- Plugin with functions inside a class & how to trigger WP CRON
- WP Cron as Fast as WordPress AJAX?
- Best place to keep files that are called by cron jobs?
- What is the use of wp_schedule_event hook?
- Running one-off cron jobs when WP_DISABLE_CRON is true: can I hit /wp-cron.php?
- How can I add an option to the Page Template list from a Plugin?
- What’s the best method for emptying an option created with the Settings API?
- template_include (overriding default plugin templates via current theme)
- Using composer for dependency management in plugindevelopment
- What is nonce and how to use it with Ajax in WordPress? [duplicate]
- Update exisiting site to 3.5 release candidate
- Why does do_action pass a blank string as the first parameter if no $arg is set?
- Build path for a custom portfolio plugin
- How to save block attributes when the output doesn’t change
- add_filter and remove_filter added before and after wp_query
- What is the difference between strip_tags and wp_filter_nohtml_kses?
- How can I hook into existing WordPress Bulk actions?
- Can’t echo get_delete_post_link
- Why is my shortcode not working
- Creating option to allow user to select the page my plugin content will display on
- Is there a naming convention for database tables created by a plugin?
- WordPress plugin options and jQuery
- Inserting JS snippet in the footer if there is no wp_footer?
- Can I differentiate between “Delete Post Permanently” and “Empty Trash” and do something for each accordingly?
- Use php libarary in wordpress plugins
- How do I add a javascript file to all admin pages via a plugin?
- unable to stop loop when using wp_insert_post with publish_post hook
- How to add a secondary button to a settings page with a custom action?
- Plugin options page – form with two different submit buttons
- Frontend Ajax call not working using wp_ajax, wp_enqueue_script and wp_localize_script
- Some strings from a .mo file do not load
- Add a row on clicking each post featured image
- How can I gracefully escape an error condition?
- best practice for query string values – get_query_var always empty for my value supplied in query string
- update post meta for checkbox in the admin when inserted in the front-end
- Plugin development: can’t update settings with multiple settings sections
- How to implement filesystem cache in WordPress
- Check for template part, else filter content
- How can I add a custom “Text” widget to Appearance manager from functions.php?
- what are the checksums surrounding keywords in the SQL generated by WP_Query and do I need to use them too?
- Is it possible to make sure that only my plugins output is shown to the enduser?
- How to do POST request with WP REST API v2 to custom table?
- Plugin generated virtual pages
- add javascript files only when plugin is called?
- wp_dropdown_roles() to replace option value = code
- Filter Categories widget to allow custom sorting?
- Make a plugin page out of influence of the theme’s style
- plugin_dir_path wrong url
- 400 Bad Request, in wordpress theme development, wp_ajax
- How to allow only two (or more) users access to a plugin
- Return Value of load_plugin_textdomain
- Admin Subpages without Menu entry
- Special Formatting for WordPress Plugin Description?
- Multiple array for post_content on plugin activation
- Check if the current user is author of first comment
- custom wp_editor does not save the content in plugin settings
- Plugin Development – Get Admin Url (Including cases where wp-admin is not used)
- Add code to template dynamically
- How Can I Add Code To A Preexisting Function Without Editing it
- Creating posts with links from a txt file
- Change the behaviour of a button
- Login page too many redirects
- Configuring Xdebug with docker compose
- escape html in jQuery for WordPress
- Progress bar in plugin within admin
- Jquery php request is returning a weird result
- WordPress admin panel not working
- Redirection from a specific page for users logged in but not with membership
- Load script on frontend from widget plugin
- Can’t get wpColorPicker to work in a widget
- Get the current post/page URL with plain permalinks
- ajax multiple Values
- WordPress Plugin Update Process
- Ajax functionality not being called under wordpress plugin
- Registration form Plugin… Email confirmation
- Add a description/hint field in the admin page of a plugin
- Saving multiple fields as array
- Serialized Data
- Can’t add images in wordpress to my page – button isn’t clickable
- Gutenberg and custom blocks messed up pagespeed score. What did I wrong?
- Gutenberg text field validation
- I don’t understand how symlinks in plugin work
- Undo operation not working in Rich text [Gutenberg]
- How will i add an option under customizer the event calendar section?
- Elementor Top-Bar
- Is it possible to add Custom Dashboard Widgets to Custom Admin Menu Page?