Why does cron link cause delayed response time when it works multiple times?
P粉132730839
P粉132730839 2023-09-08 09:00:15
0
1
575

There is a php function that can perform some database and curl operations. I use a url to run this function. Right now I'm running it manually, but in the future I'll tie it to a cron task.

My question is this. For example, I have a url like the following.

domain.com/crons/update_account_data?token=xxx

When I access this url, the function I specify will delete the data from the database and process the data from different services.

I ran this url 3 times at the same time. The data was immediately deleted from the database on the first run. But the second run starts after a certain time (for example, after 10 seconds) and the third run starts after a certain time (for example, after 20 seconds).

What is the reason? I want these 3 links I'm running at the same time to start operating at the same time.

P粉132730839
P粉132730839

reply all(1)
P粉764785924

I solved this problem. When I enter the following 4 urls, there is no problem. However, I still don't understand why it delays execution if they are all the same.

domain.com/crons/update_account_data?token=xxx
domain.com/crons/update_account_data_2?token=xxx
domain.com/crons/update_account_data_3?token=xxx
domain.com/crons/update_account_data_4?token=xxx
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template