0

When using the Commerce License Billing module the "/admin/commerce/config/license/billing-cycle-types/manage/monthly" page clearly states:

Asynchronous

Determines whether the billing cycle starts at the time of purchase, instead of starting at the beginning of the calendar period. For an order placed on Jan 5th, a monthly synchronous billing cycle would start on Jan 1st 00:00 and end on Jan 31st 23:59:59, while a monthly asynchronous billing cycle would start at the time of purchase (Jan 5th) and end a month later (Feb 5th).

I wonder what are the technical implications of choosing asynchronous or synchronous billing cycles. I mean if I go with synchronous billing period will all the recurring services be renewed on 1st of each month at the same time? Won't that make it difficult for cron?

Synchronous billing cycle seems very convenient and more appealing to the end-customers, however my main concern is that Drupal cron might stack in posterity with growing number of orders for the recurring services in the system.

Could anybody elaborate on this to confirm or mitigate my concern?

1

The "implications" are that it mimics how you want to charge your customer for access. If you want to provide a revolving 30-day access to some content, an asynchronous billing cycle might make the most sense. Whereas if you're charging for a service and want everyone to have the same billing cycle, then you'd end up prorating the first month to get to the first point of your billing cycle.

Screen capture from my digital commerce talk

At a technical level, cron should be running in daemon mode (or at least every 5-10 minutes) since your license provisioning requires it. You shouldn't have to do anything different.

  • Thank you for your comment. Maybe I failed to explain my main concern. What if the system will have thousands of customers with tens of thousands of recurring orders? How cron will process all of them on 1st days of each month? Is there any chance that cron can stuck? – Nick Nov 24 '15 at 20:12
  • Well, if you're using advanced cron, it won't be an issue because it'll happen using queues. The transactions will get queued up and executed over a short period of time, maybe 15-30 minutes. So no, cron won't get stuck because queues and advanced cron will take care of it for you. – nvahalik Nov 24 '15 at 20:16
  • I agree with that, yes. – nvahalik Nov 24 '15 at 20:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.