Reputation: 13844
I am using Twilio to send SMS in my web app.It works perfectly and sms is delivered within 15 seconds.i wanted to send SMS at a later time.For example Suppose a meeting is fixed on 1st dec 12 noon.So to inform the client i can send sms saying meeting at so and so date time.Now just before the scheduled time,automatically client will get a SMS as a reminder.Is there any way to do so.I am looking for a method in twilio API but could not find any.
Upvotes: 1
Views: 2281
Reputation: 19834
What fruityp said is just right. You should write your own program that runs every X minutes (using cron on Unix based systems or the task scheduler on windows) or a service (with a timer) that checks if an SMS should be sent through twilio.
If you take the program that runs every X minutes route, you need to make it idempotent so that you don't end up sending multiple SMS when you want to send just one. This looks obvious, but it may become an issue if your program takes Y minutes, where Y > X (you may end up having two instances running at the same time). On the task scheduler (on windows) you can explicitly set it up so that a new instance isn't launched until the previous one ends running.
Upvotes: 2
Reputation: 7586
This is not something Twilio supports, you will have to program this yourself to check if any SMS's need to be sent out ~ say every 5 minutes. I don't know if you're building a web / desktop application but this applies to both.
Upvotes: 2