Crons for saas applications

Viewed 17

I am developing and saas application where customers can get bookings online. I need to run cron jobs for following functionalities

  1. Mark bookings/appointments as completed at their end time
  2. Send email and SMS notification to customers 1hours, 1 day and 2 day before booking start time
  3. Charge cards automatically after 1 hour or 1 day of booking completion.

For these, I have created golang rest API with gin and added and bash-script which executes every 5 minutes and it hits rest API using curl command for each customer and completes the functionality. I am not sure if this architecture is good for crons or not. I searched a lot but did not get any help in terms of architecture or system. The customers will increase by time and this system will fail at some point of time or will cause delay.

I am seeking help of how to build cron system for saas application. An example is Mailchimp which sends the emails for each customers at specific time which means they are running the crons for huge customer base.

0 Answers
Related