Title: ao_ccss_queue cron running, but function is not executed (queue not processing)
Last modified: September 16, 2020

---

# ao_ccss_queue cron running, but function is not executed (queue not processing)

 *  [yghazouan](https://wordpress.org/support/users/yghazouan/)
 * (@yghazouan)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/ao_ccss_queue-cron-running-but-function-is-not-executed-queue-not-processing/)
 * 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](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/ao_ccss_queue-cron-running-but-function-is-not-executed-queue-not-processing/#post-13412876)
 * yeah, Calvacade is an issue, still not sure why :-/
 * can you in [classes/autoptimizeCriticalCSSBase.php](https://github.com/futtta/autoptimize/blob/beta/classes/autoptimizeCriticalCSSBase.php#L83)
   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](https://wordpress.org/support/users/yghazouan/)
 * (@yghazouan)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/ao_ccss_queue-cron-running-but-function-is-not-executed-queue-not-processing/#post-13413010)
 * 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](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/ao_ccss_queue-cron-running-but-function-is-not-executed-queue-not-processing/#post-13413115)
 * great. this is a known issue in cavalcade, see [https://github.com/humanmade/Cavalcade/issues/63](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.

 * ![](https://s.w.org/plugins/geopattern-icon/autoptimize-criticalcss.svg)
 * [Autoptimize criticalcss.com power-up](https://wordpress.org/plugins/autoptimize-criticalcss/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/autoptimize-criticalcss/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/autoptimize-criticalcss/)
 * [Active Topics](https://wordpress.org/support/plugin/autoptimize-criticalcss/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/autoptimize-criticalcss/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/autoptimize-criticalcss/reviews/)

## Tags

 * [cron](https://wordpress.org/support/topic-tag/cron/)

 * 3 replies
 * 2 participants
 * Last reply from: [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * Last activity: [5 years, 8 months ago](https://wordpress.org/support/topic/ao_ccss_queue-cron-running-but-function-is-not-executed-queue-not-processing/#post-13413115)
 * Status: not resolved