K
K
kopytse2017-11-05 16:12:07
PHP
kopytse, 2017-11-05 16:12:07

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

3 answer(s)
J
John Doe, 2017-11-05
@rabbit418

No.

A
azShoo, 2017-11-08
@azShoo

Provided that it will not flow from memory - no.

A
Alex-1917, 2017-11-05
@alex-1917

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 question

Ask a Question

731 491 924 answers to any question