functions = defaultdict(lambda : list())
map(lambda x: functions[x.func].append(x.meta.get('interval')), jobs)
now = datetime.datetime.now()

def schedule_once(func, interval):
    """
    Schedule job once or reschedule when interval changes
    """
if not func in functions or not interval in functions[func] or len(functions
    [func]) > 1:
    map(scheduler.cancel, [x for x in jobs if x.func == func])
scheduler.schedule(now + datetime.timedelta(seconds=interval), func,
    interval=interval)
schedule_once(tasks.some_task_a, interval=60 * 5)
schedule_once(tasks.some_task_b, interval=120)
Where do I register an rq-scheduler job in a Django app?