rq_scheduler/scheduler.py
def schedule(self, scheduled_time, func, args=None, kwargs=None,
                 interval=None, repeat=None, result_ttl=None, ttl=None,
                 timeout=None, id=None, description=None,
                 queue_name=None, meta=None, depends_on=None):
        """
        Schedule a job to be periodically executed, at a certain interval.
        """
        # Set result_ttl to -1 for periodic jobs, if result_ttl not specified
        if interval is not None and result_ttl is None:
            result_ttl = -1
        job = self._create_job(func, args=args, kwargs=kwargs, commit=False,
                               result_ttl=result_ttl, ttl=ttl, id=id,
                               description=description, queue_name=queue_name,
                               timeout=timeout, meta=meta, depends_on=depends_on)

        if interval is not None:
            job.meta['interval'] = int(interval)
        if repeat is not None:
            job.meta['repeat'] = int(repeat)
        if repeat and interval is None:
            raise ValueError("Can't repeat a job without interval argument")
        job.save()
        self.connection.zadd(self.scheduled_jobs_key,
                              {job.id: to_unix(scheduled_time)})
        return job

        Schedule a job to be periodically executed, at a certain interval.
        
Schedule a job to be periodically executed, at a certain interval.
Schedule a job to be periodically executed at a certain interval .
def schedule(self, scheduled_time, func, args=None, kwargs=None,
                 interval=None, repeat=None, result_ttl=None, ttl=None,
                 timeout=None, id=None, description=None,
                 queue_name=None, meta=None, depends_on=None):
        if interval is not None and result_ttl is None:
            result_ttl = -1
        job = self._create_job(func, args=args, kwargs=kwargs, commit=False,
                               result_ttl=result_ttl, ttl=ttl, id=id,
                               description=description, queue_name=queue_name,
                               timeout=timeout, meta=meta, depends_on=depends_on)
        if interval is not None:
            job.meta['interval'] = int(interval)
        if repeat is not None:
            job.meta['repeat'] = int(repeat)
        if repeat and interval is None:
            raise ValueError("Can't repeat a job without interval argument")
        job.save()
        self.connection.zadd(self.scheduled_jobs_key,
                              {job.id: to_unix(scheduled_time)})
        return job
def schedule ( self , scheduled_time , func , args = None , kwargs = None , interval = None , repeat = None , result_ttl = None , ttl = None , timeout = None , id = None , description = None , queue_name = None , meta = None , depends_on = None ) : if interval is not None and result_ttl is None : result_ttl = - 1 job = self . _create_job ( func , args = args , kwargs = kwargs , commit = False , result_ttl = result_ttl , ttl = ttl , id = id , description = description , queue_name = queue_name , timeout = timeout , meta = meta , depends_on = depends_on ) if interval is not None : job . meta [ 'interval' ] = int ( interval ) if repeat is not None : job . meta [ 'repeat' ] = int ( repeat ) if repeat and interval is None : raise ValueError ( "Can't repeat a job without interval argument" ) job . save ( ) self . connection . zadd ( self . scheduled_jobs_key , { job . id : to_unix ( scheduled_time ) } ) return job
Schedule a job to be periodically executed, at a certain interval.
Schedule a job to be periodically executed at a certain interval .
"""
        Schedule a job to be periodically executed, at a certain interval.
        """ # Set result_ttl to -1 for periodic jobs, if result_ttl not specified
self
scheduled_time
func
args
kwargs
interval
repeat
result_ttl
ttl
timeout
id
description
queue_name
meta
depends_on