T
T
teodolit2019-08-21 13:53:21
1C-Bitrix
teodolit, 2019-08-21 13:53:21

How to make bitrix send out at the right time?

Hello! I am writing a mailing module that sends people letters with products that have certain values ​​in their properties. All data, including the time when the distribution should start, is stored in its own table. And I still can’t figure out how to force Bitrix at the right time, find the right entry in the table and form an array of goods. There is only an idea that when saving the mailing script, create an agent with the necessary parameters, which at the specified time climbs into the table, finds the necessary record and generates the mailing list. Can you suggest the best way to solve this problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
Georgy Baruchyan, 2019-08-25
@teodolit

I will offer a combined approach:
create sending agents using the cron with a given frequency, for example:
the cron script runs every 30 minutes and collects all the records that should be sent within the next 30 minutes and creates agents based on them. Accordingly, the larger the interval, the larger the queue.
Here the parameters need to be selected, depending on the site traffic, because. if the attendance is low, then users may have a large load on processing agents. Or there may be certain dead intervals. In such cases, it is better to put sending on cron and check every couple of minutes, well, or the execution of agents on cron and the same, every couple of minutes. Basically improvise.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question