src/Viserio/Component/Cron/Cron.php
public function run()
    {
        if ($this->withoutOverlapping) {
            $item = $this->cachePool->getItem($this->getMutexName());
            $item->set($this->getMutexName());
            $item->expiresAfter(1440);

            $this->cachePool->save($item);
        }

        if (! $this->runInBackground) {
            return $this->runCommandInForeground();
        }

        $run = $this->runCommandInBackground();

        if ($this->withoutOverlapping) {
            $this->cachePool->deleteItem($this->getMutexName());
        }

        return $run;
    }
public function run()
    {
        if ($this->withoutOverlapping) {
            $item = $this->cachePool->getItem($this->getMutexName());
            $item->set($this->getMutexName());
            $item->expiresAfter(1440);

            $this->cachePool->save($item);
        }

        if (! $this->runInBackground) {
            return $this->runCommandInForeground();
        }

        $run = $this->runCommandInBackground();

        if ($this->withoutOverlapping) {
            $this->cachePool->deleteItem($this->getMutexName());
        }

        return $run;
    }
{@inheritdoc}