public function crontabCallback(Crontab $crontab, LoopInterface $loop)
    {
        $loop->addTimer(60 - time() % 60, function () use ($crontab) {
            $pid = pcntl_fork();
            if ($pid > 0) {
                return;
            } elseif ($pid == 0) {
                $crontab->start(time());
                exit();
            } else {
                $this->logger->error("could not fork");
                exit();
            }
        });
    }
public function crontabCallback(Crontab $crontab, LoopInterface $loop)
    {
        $loop->addTimer(60 - time() % 60, function () use ($crontab) {
            $pid = pcntl_fork();
            if ($pid > 0) {
                return;
            } elseif ($pid == 0) {
                $crontab->start(time());
                exit();
            } else {
                $this->logger->error("could not fork");
                exit();
            }
        });
    }
public function crontabCallback ( Crontab $ crontab , LoopInterface $ loop ) { $ loop -> addTimer ( 60 - time ( ) % 60 , function ( ) use ( $ crontab ) { $ pid = pcntl_fork ( ) ; if ( $ pid > 0 ) { return ; } elseif ( $ pid == 0 ) { $ crontab -> start ( time ( ) ) ; exit ( ) ; } else { $ this -> logger -> error ( "could not fork" ) ; exit ( ) ; } } ) ; }
start crontab every minute
start crontab every minute