action-scheduler icon indicating copy to clipboard operation
action-scheduler copied to clipboard

[question] recommended processing frequency via WP-CLI

Open ju1ius opened this issue 2 years ago • 2 comments

Hi,

I want to use WP-CLI exclusively to process action queues on a WooCommerce site. The docs don't mention any recommended time interval between wp action-scheduler run invocations.

Hence the question: When processing queues via WP-CLI with the default runner disabled, what is the recommended time interval between wp action-scheduler run invocations on a WooCommerce site ?

Thanks.

ju1ius avatar Jul 10 '22 15:07 ju1ius

Hi @ju1ius , there's no explicit recommended value since the optimal value depends on the traffic of the site and the nature of the actions being run. You could start with one minute, for example, and see how it works for you. I hope that helps!

Konamiman avatar Jul 13 '22 09:07 Konamiman

I hope that helps!

Well it definitely helps. I had initially set it to run every 15mn (same as wp-cron), but from your answer I infer that this is definitely not enough.

I still think this deserves a little chapter in the docs. 😉

If there aren't any official recommendations for this, I'd be glad to hear feedback from other users on their usage patterns.

Thanks.

ju1ius avatar Jul 13 '22 10:07 ju1ius

Thanks for the suggestion. Since the frequency of running AS runner depends on many variables (but mostly how many actions the site needs to run and the capacity of the servers), it's difficult to give any general recommendations. If you need to process a thousand actions per hour, but you'll get a spike of a thousand actions in 10 minutes, the answer will probably even depend on what those actions actually do so that we could give any recommendations about what's an acceptable delay, etc.

Closing the issue for now, but if we get more requests, we can look into getting some data from hosting partners and their experience.

peterfabian avatar Aug 15 '22 15:08 peterfabian