i have vps and need some help with case , in crontab there are command run every minute
* * * * * /usr/share/html/mysite/do.php
in do.php file there are some thing like this
<?php
class job
{
function fetch()
{
global $curl;
for($i=0;$i<4;$i++) {
$res = $curl->get('http://www.****.com/data.php');
if($res == 'OK') {
return 'OK';
}
sleep(60);
}
}
}
$job = new job();
$value = 5;
for($i=0;$i<$value;$i++) {
$job->fetch();
}
?>
now my problem in$job->fetch();
i want Repeat five times with out wait
but my problem its wait respond from function fetch
maybe 1 min or max 4 min
i need to run this job 5 times in same .
note: i can use any thing curl exec etc...