Support » Plugin: WP Crontrol » Question: Object Cache interfering with Cron status

  • Resolved disturbed-pixel


    Hi John,

    Great plugin btw.

    I an issue i’d like your advice on, that i hope is quick to answer.

    WP 5.6
    PHP 7.4
    W3TC Plugin
    Object Cache: Redis
    Cron executed by crontab -> WP-CLI

    The crontab script fires fine every 10 mins via WP-CLI and the output is logged nicely, what was run, did it execute successfully etc. I know the Crons are running fine, but i have noticed that when i go to your plugin page:


    It shows many of the events as overdue, so i check my log and can see they were run successfully on time. So when i clear the Object cache and revisit the page, all the events show they all run successfully and none are overdue.

    Object cache is storing the results in Redis…

    What i want to do is either exclude the relevant transient/cached key from the object cache, so that i have accurate results on the cron jobs last run.

    What is the cache/transient key i should be looking for?

    Do you know where the ‘last run’ results are stored? i know it’s not DB: Options -> option_name > Cron.

    Ultimately i want the Crontrol events page to show current results when it’s visited.

    Any ideas/suggestions welcomed
    Thanks for your time

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author John Blackbourn


    WordPress Core Developer

    I’m not sure what you’re referring to when you say the “last run” time, there’s nowhere in WordPress core or in WP Crontrol that logs the last run time of a cron event.

    Can you explain a bit more?

    Thread Starter disturbed-pixel


    Sorry John. See the pic in the link. screenshot

    Where it shows next run and that most of those crons are 2-3 hours behind. I can see your plugin is calculating the difference in time. I couldn’t find a last run in the DB for the crons.

    Soon as i clear the object cache, all those late alerts will disappear, so i was hoping to find out what transient/cache key i should clear or add to an exception, so that i don’t have to clear the object cache to see updated information for the Crons within your plugin.


    Plugin Author John Blackbourn


    WordPress Core Developer

    Ah I see.

    There’s no transient or cache for this, it’s calculated based on the cron option in the database.

    For example, the cron option stores upcoming events keyed by the timestamp that they are due to run. WP Crontrol looks at these timestamps and if they are in the past then it shows that they are overdue.

    It sounds to me like your object cache is malfunctioning and the cron option in the database is not being updated after cron events run – or it is being updated but a stale version is in your cache somewhere.

    I recommend getting in touch with W3TC about this, or with your web host if the host provides the Redis infrastructure.

    Thread Starter disturbed-pixel


    Thanks John,

    I was trying to find out if i could manually clear the cron option or exclude it from objcache. Redis is working fine, but yes i could get in contact with W3TC to see if they can help.

    Its not mission critical, just annoying.

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.