Answer the question
In order to leave comments, you need to log in
How to implement sending sms 100-500 sms at a time?
There is a customer base on the site. You need to send each of them a text message every six months. The database is filled gradually, a client was added today or his records were updated, six months is fixed from this moment. Thus, in the future, it may accumulate so that in one day you need to send 100 or 500 customers at a time.
I plan to do this, the last_updated date column is simply updated in the database.
And then cron will run a script every day, the script will pull out those records if last_updated is equal to or greater than 6 months. Let's say 100 records are pulled out. I send sms to each of them and update last_updated
(foreach $items as $item)
{
sendSms($iitem->phone);
// а здесь по айди item находим запись и обновляем last_updated
}
Answer the question
In order to leave comments, you need to log in
The most important thing is that you did not mention!)) Namely, the way to send SMS. Here everything rather depends on the service provider: the method of receiving data from you, if there are restrictions (maybe a timeout or number per day there, for example ...)
And forich you will go through them or with a file - in my opinion, in general, up to one place: )
For example: I use a service that allows you to directly connect to their database (there is a separate table for each client) and just insert as many SMS into it as my heart desires, at least 100 at least 1000 at least lyam (well, the funds on the account :) ), and then his problems are how he will send them. He received the data, "signed" - arividerchi :)
without premature optimization, the solution is correct
and so - think about what to do when the time for the next cron has come, but there is no information yet whether the SMS has been delivered
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question