php – How can I stop ActionScheduler recurring task running after 5 runs?

I am using the ActionScheduler library from WooCommerce as_schedule_recurring_action() function, and am trying to find a way to stop recurring tasks running after 5 runs.

I have not seen any parameter that allows for this sort of recurring limit.

Is there a way to do it that I’m simply not aware of? Or will there be a need to create a wrapper around this to enable that particular functionality.