A
A
Alex Franz2018-11-26 17:16:31
PHP
Alex Franz, 2018-11-26 17:16:31

Extracting a column from the database and further data processing (RedBeanPHP). How to implement?

Good evening!
Task : run a php script by cron (every 10-15 minutes), which will connect to the database, retrieve values ​​from a certain column, then compare these values ​​with the current time and if in some "cell" the difference with the current time is significant - we perform certain actions.
What is it for? I have a WebSocket server (Workerman) running on php. Clients are connected to this server. Periodically, I exchange messages with them (like ping-pong, if the client answers me, I write down the current time to the database for him). If the client disconnects purposefully (not a connection break) - I will see it. But if the connection is closed due to a break, I can't see it. Such feature of Workerman.
I need to monitor the connection of each client, so I want to check his "heartbeat" in this way.
How can this be implemented?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question