• Hi, recently I helped a couple of WP users dealing with scheduled tasks not being executed even if the wp-cron.php was triggered enough often.
    I discovered that disabling the object cache solves the problem completely (Litespeed with memcache and Aruba speed cache).

    I was able to debug by modifying the wp-cron.php and found out the check at the end of the execution loop:

    if ( _get_cron_lock() !== $doing_wp_cron ) {

    Was ending prematurely the loop even if the “lock” was not “stolen”. Probably the object cache was returning a stale value. The second case seemed not related to the lock but to the caching of the “cron jobs”, but I was unable to debug it.

    I would suggest, limited to the wp-cron.php, to totally avoid/disable the object caching. I was not able to determine if it’s a problem with the cache implementations or the WP code negatively affected by the object caching.

    Take away: if your WP scheduler is not working correctly (you can check it with the very recomended WP Crontrol plugin), try to disable the Object Cache of your caching plugin, if active.

Viewing 1 replies (of 1 total)
  • Moderator threadi

    (@threadi)

    I’m not sure if you can say that across the board for every object cache. I know and use various plugins in several projects, and none of them have this problem. My recommendation would be to contact the support team for the plugin that provides the object cache in your project.

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.