Answer the question
In order to leave comments, you need to log in
How to send Curl requests with a time interval?
There is a script that makes a request using Curl and receives a response, I need to send such a request every 15 seconds, I wanted to use cron, but it’s impossible there for less than a minute, when using sleep(13); in a loop, the first request is sent and the rest are not
for ($i=0; $i < 4; $i++)
{
//Тут отправляется запрос
sleep(13);
}
Answer the question
In order to leave comments, you need to log in
// here I screwed something up, but I won't show you
So what?
Staff telepath in quarantine, sorry.
Most likely incorrect reuse of variables for curl functions, but xs.
Judging by a question, business under an Unix.
Then what... are you not using bash?
#!/bin/bash
while ( 1 )
do
php script_with_url.php
sleep 13
done;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question