src/Queues/Queue.php
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
        );
    }
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
        );
    }
Make a recurring job in this queue.

@param  string      $className The class with the job perform method.
@param  array       $data      An array of parameters for job.
@param  int|null    $interval  The recurring interval in seconds.
@param  int|null    $offset    A delay before the first run in seconds.
@param  string|null $jid       The specified job id, if not a specified, a jid will be generated.
@param  int|null    $retries   Number of times the job can retry when it runs.
@param  int|null    $priority  A negative priority will run sooner.
@param  int|null    $backlog
@param  array|null  $tags      An array of tags to add to the job.

@return string

@throws QlessException
@throws RuntimeException