I have a cron file cron/cron1.php. i have set up this for cron running 1 minute.
so for next process it will take 1 minute to execute.
now i want to run this file parallel three times in minute. this file takes execution time more than 2 min.
can i run this file parallel in a single file like this
file1.php
<?php
include("cron/cron1.php"); // run seperately
sleep(5);
include("cron/cron1.php"); // run seperately
sleep(5);
include("cron/cron1.php"); // run seperately
?>
in above file cron1.php will execute 5 seconds difference but when above one is completed its process. as i told you each cron1.php will takes more than 2 minutes to complete. so i couldn't achieve it.
is there any process or multithreading or approch so that i can run each cron1.php every 5 seconds delay. then i will set the file1.php as a cron job.