0
votes

Hoping I can get some help (again). I'm working on a multi-tenant PHP application. Each tenant will have their own database (mysql). Ultimately, my plan is to stand the service up on AWS using ELB, EC2, and DynamoDB.

However, the app will need to run certain scheduled tasks (it needs to pull open invoices from a PSA for certain customers, and then charge the customer using Authroize.net CIM and mark it paid in the PSA).

For a regular application, I would simply create a cron script that runs daily to create/process the payment batches. I'm just not sure what the appropriate approach would be to run the cron across each tenant (for each database). Maybe one master cron job that runs across each tenant, or do I write a script to create / maintain cron jobs for each tenant using SWF?

Thanks for your input.

1

1 Answers

1
votes

I've had reasonable success with doing batch processing via cron in the past. It might be helpful to record tenant creation in a table that you can query as a source for which databases to run against within the cron job.