protected function initializeVariables()
    {
        // Capture duration of scheduler with Symfony's Stopwatch component.
        $this->stopwatchScheduler = new Stopwatch();
        $this->stopwatchScheduler->start('scheduler');

        // If in dev mode, use a long interval to make testing the scheduler easier.
        if ($this->getContainer()->getParameter('campaignchain.env') == 'dev') {
            $this->interval = $this->getContainer()->getParameter('campaignchain_core.scheduler.interval_dev');
        } else {
            $this->interval = $this->getContainer()->getParameter('campaignchain_core.scheduler.interval');
        }

        $this->timeout = $this->getContainer()->getParameter('campaignchain_core.scheduler.timeout');;

        if ($this->getContainer()->has('monolog.logger.scheduler')) {
            $this->logger = $this->getContainer()->get('monolog.logger.scheduler');
        } else {
            $this->logger = $this->getContainer()->get('logger');
        }

        /** @var ManagerRegistry $managerRegistry */
        $managerRegistry = $this->getContainer()->get('doctrine');
        $this->em = $managerRegistry->getManager();
    }