I have something like this in my kernel.php
protected function schedule(Schedule $schedule)
{
$schedule->command('command:richiesta')
->everyThirtyMinutes()
->unlessBetween('17:25','20:35')
->withoutOverlapping();
$schedule->command('command:RenewOption')
->everyFifteenMinutes()
->between('17:30','20:30')
->withoutOverlapping();
}
The "richiesta" command takes around one minute to end his stuffs, instead the "RenewOption" command could take 0-15 minutes to a couple of hours. Because both "richiesta" and "RenewOption" are making a lot of parrallel curl request to an external API, I don't want them to overlap and hit the API limits, so I scheduled in a safe timing zone way. But it is a little useless to completely stop "richiesta" for 3 hours if "RenewOption" is done, or is simply not running because, in example, there is no data to fetch.
So how can I avoid the overlapping of those 2 commands without set a safe time zone? Probably some cache buffer, but I couldn't found a way to manage this.