def scheduler(rq, ctx, verbose, burst, queue, interval, pid):
    "Periodically checks for scheduled jobs."
    scheduler = rq.get_scheduler(interval=interval, queue=queue)
    if pid:
        with open(os.path.expanduser(pid), 'w') as fp:
            fp.write(str(os.getpid()))
    if verbose:
        level = 'DEBUG'
    else:
        level = 'INFO'
    setup_loghandlers(level)
    scheduler.run(burst=burst)
Periodically checks for scheduled jobs.