R
R
root092015-11-26 16:54:18
PHP
root09, 2015-11-26 16:54:18

Executing a script once per second?

Hello, what is the best way to solve this problem?
There is a task to do something like this: https://soojoo.ru/lots/info?id=2504
There is a timer, for example 20 seconds, at the moment when there are 5 seconds left, you need to perform actions, how can this be done?
through cron , the minimum interval is 2 minutes

Answer the question

In order to leave comments, you need to log in

2 answer(s)
L
link_irk, 2015-11-26
@root09

Auctions are real-time applications. And delays there are highly undesirable, if not completely unacceptable. Use more suitable technologies for this. For example, websockets, Comet...

O
Optimus, 2015-11-26
Pyan @marrk2

cron, in the cron loop, in the sleep(1) loop - 1 second, and the condition if the loop counter = 20 then perform some action

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question