public static function createSchedule(ContainerInterface $container): Schedule
    {
        $options = self::resolveOptions($container->get('config'));

        $scheduler = new Schedule($options['path'], $options['console']);

        if ($container->has(CacheItemPoolInterface::class)) {
            $scheduler->setCacheItemPool($container->get(CacheItemPoolInterface::class));
        }

        $scheduler->setContainer($container);

        return $scheduler;
    }