src/M6Web/Bundle/DaemonBundle/Command/DaemonCommand.php
public function addIterationsIntervalCallback($iterationsInterval, callable $onIterationsInterval)
    {
        if (!is_int($iterationsInterval) || ($iterationsInterval <= 0)) {
            throw new \InvalidArgumentException('Iteration interval must be a positive integer');
        }

        $this->iterationsIntervalCallbacks[] = ['interval' => $iterationsInterval, 'callable' => $onIterationsInterval,];
    }
public function addIterationsIntervalCallback($iterationsInterval, callable $onIterationsInterval)
    {
        if (!is_int($iterationsInterval) || ($iterationsInterval <= 0)) {
            throw new \InvalidArgumentException('Iteration interval must be a positive integer');
        }

        $this->iterationsIntervalCallbacks[] = ['interval' => $iterationsInterval, 'callable' => $onIterationsInterval,];
    }
public function addIterationsIntervalCallback ( $ iterationsInterval , callable $ onIterationsInterval ) { if ( ! is_int ( $ iterationsInterval ) || ( $ iterationsInterval <= 0 ) ) { throw new \ InvalidArgumentException ( 'Iteration interval must be a positive integer' ) ; } $ this -> iterationsIntervalCallbacks [ ] = [ 'interval' => $ iterationsInterval , 'callable' => $ onIterationsInterval , ] ; }
Add your own callback after every iteration interval.

@param int $iterationsInterval
@param callable $onIterationsInterval
Add your own callback after every iteration interval .