• Hi,

    I have on our site the autoptimize plugin (2.7.7) in a multisite environment. The Cron Jobs are managed by the Cavalcade Plugin, so cron functionality is not running through the regular wp-cron.
    I want to make the critical CSS functionality work but all Jobs in the queue remain in the status New and one (front_page) is on pending.
    Whenever I try to run the cron manually, the cron is being executed but the function (autoptimizeCriticalCSSCron->ao_ccss_queue_control()) is not being executed.
    The cron itself works, I checked this with a seperate plugin registering a cron job the same way you guy do it.
    What could be the problem here? I’ve put an error_log into the first line of the ao_ccss_queue_control() but its not visible in the cron log after the cron is executed. the queue log doesn’t display any processing at all…

    Can you please help with this issue?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    yeah, Calvacade is an issue, still not sure why :-/

    can you in classes/autoptimizeCriticalCSSBase.php on line 83 change
    if ( defined( ‘DOING_CRON’ ) || is_admin() ) {
    into
    if ( true || defined( ‘DOING_CRON’ ) || is_admin() ) {

    (loading the cron PHP even if DOING_CRON is not set (yet) and test again?

    Thread Starter yghazouan

    (@yghazouan)

    Now things start to be moving…
    The code is now being executed and new rules being generated.

    Thank you!

    Is it safe to let it work like this permanently?

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    great. this is a known issue in cavalcade, see https://github.com/humanmade/Cavalcade/issues/63

    now can you try changing that line into:

    if ( defined( ‘WP_CLI’ ) || defined( ‘DOING_CRON’ ) || is_admin() ) {

    and test again? goal is to only load the cron code when absolutely needed to avoid loading (and parsing) code that is not needed.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘ao_ccss_queue cron running, but function is not executed (queue not processing)’ is closed to new replies.