Archived topic
Cron jobs
3 replies · Started by Pablo Querol on June 3, 2021
A couple of years ago we did a website with a lot of plugins: all of them are necessary because it's a complex site. Several of this plugins are from WooCommerce (Subscriptions, Bookings and Memberships are the most important).
At that specific moment we were in a smaller hosting plan than today. We were consuming a lot of server resources so we needed to make some adjustments. We are on https://www.siteground.es/
One of those adjustments were the cron jobs. We made an adjustment to make the website lighter in this terms, launching less cron jobs per minute/hour/day.
We were working fine, with a smaller issues easily solved. Some months ago we moved to a cloud hosting (still at SiteGround) and we started to have some issues related (we think) with the cron jobs: some emails not arriving and more errors in the "failed-scheduled-actions" log. Also some plugin integrations (like ActiveCampaign) started to disconnect every certain time.
A few days ago, we deleted that cron jobs adjustments we did a couple of years ago and the website started launching previously failed payments and booking emails. So we returned quickly to the previous situation in order to control the site.
What have we done yet?
We contacted with WooCommerce and they take a look at the site. They told us the following:
I took a look at your scheduled action logs. Scheduled actions are responsible for subscription renewals, expirations, cancellations, and a variety of other scheduled events on your site.
I'm seeing a few different things in your scheduled action logs.
Theme Error
2021-05-18T09:18:10+00:00 CRITICAL Uncaught Error: Call to a member function get_topic() on null in /home/customer/www/institutoangeleswolder.com/public_html/wp-content/themes/generatepress_child/functions.php:18 Stack trace: #0 /home/customer/www/institutoangeleswolder.com/public_html/wp-includes/class-wp-hook.php(292): bbloomer_variations_in_webhook(Array, '', 92713, 0) #1 /home/customer/www/institutoangeleswolder.com/public_html/wp-includes/plugin.php(212): WP_Hook->apply_filters(Array, Array) #2 /home/customer/www/institutoangeleswolder.com/public_html/wp-content/plugins/woocommerce/includes/class-wc-webhook.php(481): apply_filters('woocommerce_web...', Array, '', 92713, 0) #3 /home/customer/www/institutoangeleswolder.com/public_html/wp-content/plugins/woocommerce/includes/class-wc-webhook.php(318): WC_Webhook->build_payload(92713) #4 /home/customer/www/institutoangeleswolder.com/public_html/wp-content/plugins/woocommerce/includes/wc-webhook-functions.php(78): WC_Webhook->deliver(92713) #5 /home/customer/www/institutoangeleswolder.com/publ en /home/customer/www/institutoangeleswolder.com/public_html/wp-content/themes/generatepress_child/functions.php en la línea 18This is an error that originates with your child theme. It was logged when this scheduled action ran: woocommerce_deliver_webhook_async. I'd recommend having your theme developer take a look at this error and see if they can determine the issue with the function referenced.
As there is a bunch of older Cron items and custom cron items, this would be best to reach out to your theme developer since they were tied to the custom cron job of woocommerce_deliver_webhook_async. They should be able to shed more light on this, as well as clear it up and ensure it doe snot happen in the future.
So here we are. Can you take a look or tell me what to do?
Thanks in advance!
Hi there,
the error is being generated by a custom function in your child theme - if you look at the Stack Trace you will see which function is triggering the issue:
bbloomer_variations_in_webhook
Which by that name came from here:
https://www.businessbloomer.com/woocommerce-add-custom-field-product-variation/
Maybe the originator of that code may be able to assist with debugging the issue ?
Hi David,
Thanks for your quick answer. I will contact the developer that made that function.
I will keep you updated if this solves the issue.
You're welcome - hope they have an answer :)