A permanently running PHP script sleep php sleep
I have read the post I asked to determine whether only one permanent running script is running.
Now I want to ask sleep () for 1 second
Sleep () 10 seconds
Sleep () 1 minute
Sleep () half an hour
Sleep () one hour
The difference in time has a significant impact on the server pressure and memory usage. only one of them is running, and then the running will judge whether there is a running
Reply to discussion (solution)
Sleep is used to suspend a running php program and is obviously not suitable for web applications.
Since the php program is suspended, it will not increase or decrease the memory usage.
Sleep is used to suspend a running php program and is obviously not suitable for web applications.
Since the php program is suspended, it will not increase or decrease the memory usage.
This is much better. it was originally intended to sleep for half an hour, but it would be too much trouble to verify that it is already running.