def schedule(self, time_or_delta, *args, **kwargs):
        """
        A function to schedule running a RQ job at a given time
        or after a given timespan::

            @rq.job
            def add(x, y):
                return x + y

            add.schedule(timedelta(hours=2), 1, 2, timeout=10)
            add.schedule(datetime(2016, 12, 31, 23, 59, 59), 1, 2)
            add.schedule(timedelta(days=14), 1, 2, repeat=1)

        :param \\*args: The positional arguments to pass to the queued job.

        :param \\*\\*kwargs: The keyword arguments to pass to the queued job.

        :param queue: Name of the queue to queue in, defaults to
                      queue of of job or :attr:`~flask_rq2.RQ.default_queue`.
        :type queue: str

        :param timeout: The job timeout in seconds.
                        If not provided uses the job's timeout or
                        :attr:`~flask_rq2.RQ.default_timeout`.
        :type timeout: int

        :param description: Description of the job.
        :type description: str

        :param result_ttl: The result TTL in seconds. If not provided
                           uses the job's result TTL or
                           :attr:`~flask_rq2.RQ.default_result_ttl`.
        :type result_ttl: int

        :param ttl: The job TTL in seconds. If not provided
                    uses the job's TTL or no TTL at all.
        :type ttl: int

        :param repeat: The number of times the job needs to be repeatedly
                       queued. Requires setting the ``interval`` parameter.
        :type repeat: int

        :param interval: The interval of repetition as defined by the
                         ``repeat`` parameter in seconds.
        :type interval: int

        :param job_id: A custom ID for the new job. Defaults to a UUID.
        :type job_id: str

        :return: An RQ job instance.
        :rtype: ~flask_rq2.job.FlaskJob

        """
        queue_name = kwargs.pop('queue', self.queue_name)
        timeout = kwargs.pop('timeout', self.timeout)
        description = kwargs.pop('description', None)
        result_ttl = kwargs.pop('result_ttl', self.result_ttl)
        ttl = kwargs.pop('ttl', self.ttl)
        repeat = kwargs.pop('repeat', None)
        interval = kwargs.pop('interval', None)
        job_id = kwargs.pop('job_id', None)

        if isinstance(time_or_delta, timedelta):
            time = datetime.utcnow() + time_or_delta
        else:
            time = time_or_delta

        return self.rq.get_scheduler().schedule(
            time,
            self.wrapped,
            args=args,
            kwargs=kwargs,
            interval=interval,
            repeat=repeat,
            result_ttl=result_ttl,
            ttl=ttl,
            timeout=timeout,
            id=job_id,
            description=description,
            queue_name=queue_name,
        )
A function to schedule running a RQ job at a given time
        or after a given timespan::

            @rq.job
            def add(x, y):
                return x + y

            add.schedule(timedelta(hours=2), 1, 2, timeout=10)
            add.schedule(datetime(2016, 12, 31, 23, 59, 59), 1, 2)
            add.schedule(timedelta(days=14), 1, 2, repeat=1)

        :param \\*args: The positional arguments to pass to the queued job.

        :param \\*\\*kwargs: The keyword arguments to pass to the queued job.

        :param queue: Name of the queue to queue in, defaults to
                      queue of of job or :attr:`~flask_rq2.RQ.default_queue`.
        :type queue: str

        :param timeout: The job timeout in seconds.
                        If not provided uses the job's timeout or
                        :attr:`~flask_rq2.RQ.default_timeout`.
        :type timeout: int

        :param description: Description of the job.
        :type description: str

        :param result_ttl: The result TTL in seconds. If not provided
                           uses the job's result TTL or
                           :attr:`~flask_rq2.RQ.default_result_ttl`.
        :type result_ttl: int

        :param ttl: The job TTL in seconds. If not provided
                    uses the job's TTL or no TTL at all.
        :type ttl: int

        :param repeat: The number of times the job needs to be repeatedly
                       queued. Requires setting the ``interval`` parameter.
        :type repeat: int

        :param interval: The interval of repetition as defined by the
                         ``repeat`` parameter in seconds.
        :type interval: int

        :param job_id: A custom ID for the new job. Defaults to a UUID.
        :type job_id: str

        :return: An RQ job instance.
        :rtype: ~flask_rq2.job.FlaskJob