Upon saving a new post (of a certain post type), a given operation has to run. The problem is that the operation is calling an external (slow) API, which means that the (not logget in) end-user might having to wait for 20-30 seconds, upon creating this new post (not good for the user-experience).
When I execute this command wp cron event list
, this is the output:
I’m programming the integration with external API (real estate). I have one CRON job which is planned for at 1 o’clock am. It’s running very well because I’m using server CRON initialize instead WP CRON standard so It’s running at the right time.
WordPress has a cron named “delete_expired_transients
” as seen in the image below.
I have a user using my plugin that has multiple AWS instances hosting WP and pointing to the same database. One of the jobs of my plugins is to run a large number of small jobs.
I usually use the events manager in PHP MyAdmin to set up scheduled events but since migrating to WP Engine they do not allow it and I must write a function to use WP Cron instead. What should this look like written as a WP function?
Since yesterday the wp_scheduled_auto_draft_delete
cron job somehow deletes all page entries from our menus. All entries in the table wp_postmeta
with meta_key = '_menu_item_object'
and meta_value = 'page'
get deleted in the process. By tracing back the DELETE query I found out that the menu entries are deleted by a function called _wp_delete_post_menu_item
. I got the following stacktrace for that function:
The goal I want to use wp_schedule_single_event( ) to execute a single event that sends me an e-mail 8 minutes after the user submits a…
If a user visits a site and his visit triggers a cron job that is quite intensive, the page load speed will be slower for him right? As I understand the page doesn’t wait for the cron job to execute before loading, but since the cron job would be running in parallel, it might still be the case that the page loads slower since the server is busy right?
I would like to run a filter on post content after it has been created or updated.