I have a cron file cron/cron1.php. I set this for cron running 1 minute.
therefore, the next process will take 1 minute.
Now I want to run this file in parallel three times a minute. This file takes a runtime of more than 2 minutes.
I can run this file in parallel in a single file like this
file1.php
<?php
include("cron/cron1.php");
sleep(5);
include("cron/cron1.php");
sleep(5);
include("cron/cron1.php");
?>
in the above file, a cron1.phpdifference of 5 seconds will be executed, but when its process will be completed over it. as I told you, each cron1.phpwill take more than 2 minutes. therefore, I could not achieve this.
is there any process or multithreading or matching so that I can run every cron1.phpevery 5 seconds of delay. then I will install file1.phpas a cron job.