V
V
Vladimiros2017-03-12 14:42:03
Network administration
Vladimiros, 2017-03-12 14:42:03

Processing data from the database in the background on the hosting?

Hello.
I have a DB, it has only one table with two fields "id" and "message in json".
I work with the table as with queue. I take the very first message, process it and send a response to the user, delete this message from the table. The problem is that there are a large number of messages and a normal session is not enough to process all the messages. Therefore, I need a script that would perform processing in the background (something like a php daemon). Another problem is that due to the small budget I use regular Elastic web hosting and I have no idea how to run and control a running script. Plus, on this hosting you can use scripts only in php. Help plz)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey Lebedev, 2017-03-12
@swanrnd

There is such thing CRON. Which can do some actions, let's say run the script once a minute, all this can be found in more detail in the hoster's panel.

N
nehaeve, 2017-03-17
@nehaeve

Use cron. Don't forget about protection against repeated script execution.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question