I am building a medication reminder system using Ruby on Rails to be deployed on heroku.
Using this system a doctor will enter a patient’s medication details including medication name, dose as well as timing details and the app will then notify the patient via sms when its time to take his/her medicine.
I have developed the application but I am stuck on the sms part since that involves running a process over and over again until the medication’s period has elapsed.
I want to be able to run a script from a rails app that will repeatedly query the database and when it is time to send a sms it will dispatch it to the patient. This cannot function in the normal request/response web cycle.
I explored rubygems that allow developers to create background jobs such as rufus scheduler and resque but I can’t seem to figure out how to go about doing this.
Please help I am open to all types of suggestions. I am using Twilio for sending sms