public function recur(
        string $className,
        array $data,
        ?int $interval = null,
        ?int $offset = null,
        ?string $jid = null,
        ?int $retries = null,
        ?int $priority = null,
        ?int $backlog = null,
        ?array $tags = null
    ) {
        try {
            $jid = $jid ?: Uuid::uuid4()->toString();
        } catch (\Exception $e) {
            throw new RuntimeException($e->getMessage(), $e->getCode(), $e);
        }

        $data = json_encode($data, JSON_UNESCAPED_SLASHES);
        if (empty($data)) {
            throw new RuntimeException(
                sprintf(
                    'Unable to encode payload to make a recurring job "%s" for the "%s" queue.',
                    $jid,
                    $this->name
                )
            );
        }

        return $this->client->recur(
            $this->name,
            $jid,
            $className,
            $data,
            'interval',
            is_null($interval) ? 60 : $interval,
            is_null($offset) ? 0 : $offset,
            'priority',
            is_null($priority) ? 0 : $priority,
            'tags',
            json_encode($tags ?: [], JSON_UNESCAPED_SLASHES),
            'retries',
            is_null($retries) ? 5 : $retries,
            'backlog',
            is_null($backlog) ? 0 : $backlog
        );
    }