N
N
Nik_Haker2017-08-07 17:28:03
linux
Nik_Haker, 2017-08-07 17:28:03

cron task or daemon?

Greetings. There is a php script that once a minute (or rather, when the time changes, for example from 12:00 to 12:01) should update certain data. What is better to choose for this, a cron task with minutes * or make the script a daemon process, while(true){ ... sleep(60); } ?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Maxim Kozhin, 2017-08-07
@Nik_Haker

Cron of course. It will be launched for you without you.
The demon will not start without you. Well, or someone can provoke its launch, but there is no guarantee that the time will hit exactly 12:00

Y
Yurka Blokhin, 2017-08-08
@blrik

of course cron

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question