Answer the question
In order to leave comments, you need to log in
Can a continuously running PHP script load the server?
It is planned that a certain PHP script will run once and work continuously, in a cycle, according to the following algorithm:
- a request to a third-party server;
- record in the database;
sleep(5);
- request to a third-party server;
- record in the database;
sleep(5);
- etc.
Wouldn't that be a noticeable load on the server?
PS: "cron" is definitely not good.
Answer the question
In order to leave comments, you need to log in
The server will not load, but the script will be destroyed in 30 seconds if you do not have your own server))) Yes, and = hosters will definitely be interested.
I can’t even imagine why cron definitely didn’t please. Do you really need a pause accuracy of 5 seconds?)) If 5-15 seconds is enough, then use the trigger on the hit, and form the hit with any page accessibility service, the same uptime robot
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question