def parallel_timebin_lcdir(lcdir,<EOL>binsizesec,<EOL>maxobjects=None,<EOL>outdir=None,<EOL>lcformat='<STR_LIT>',<EOL>lcformatdir=None,<EOL>timecols=None,<EOL>magcols=None,<EOL>errcols=None,<EOL>minbinelems=<NUM_LIT:7>,<EOL>nworkers=NCPUS,<EOL>maxworkertasks=<NUM_LIT:1000>):
try:<EOL><INDENT>formatinfo = get_lcformat(lcformat,<EOL>use_lcformat_dir=lcformatdir)<EOL>if formatinfo:<EOL><INDENT>(fileglob, readerfunc,<EOL>dtimecols, dmagcols, derrcols,<EOL>magsarefluxes, normfunc) = formatinfo<EOL><DEDENT>else:<EOL><INDENT>LOGERROR("<STR_LIT>")<EOL>return None<EOL><DEDENT><DEDENT>except Exception as e:<EOL><INDENT>LOGEXCEPTION("<STR_LIT>")<EOL>return None<EOL><DEDENT>lclist = sorted(glob.glob(os.path.join(lcdir, fileglob)))<EOL>return parallel_timebin(lclist,<EOL>binsizesec,<EOL>maxobjects=maxobjects,<EOL>outdir=outdir,<EOL>lcformat=lcformat,<EOL>timecols=timecols,<EOL>magcols=magcols,<EOL>errcols=errcols,<EOL>minbinelems=minbinelems,<EOL>nworkers=nworkers,<EOL>maxworkertasks=maxworkertasks)<EOL>
This time bins all the light curves in the specified directory.

Parameters
----------

lcdir : list of str
    Directory containing the input LCs to process.

binsizesec : float
    The time bin size to use in seconds.

maxobjects : int or None
    If provided, LC processing will stop at `lclist[maxobjects]`.

outdir : str or None
    The directory where output LCs will be written. If None, will write to
    the same directory as the input LCs.

lcformat : str
    This is the `formatkey` associated with your light curve format, which
    you previously passed in to the `lcproc.register_lcformat`
    function. This will be used to look up how to find and read the light
    curve file.

lcformatdir : str or None
    If this is provided, gives the path to a directory when you've stored
    your lcformat description JSONs, other than the usual directories lcproc
    knows to search for them in. Use this along with `lcformat` to specify
    an LC format JSON file that's not currently registered with lcproc.

timecols,magcols,errcols : lists of str
    The keys in the lcdict produced by your light curve reader function that
    correspond to the times, mags/fluxes, and associated measurement errors
    that will be used as inputs to the binning process. If these are None,
    the default values for `timecols`, `magcols`, and `errcols` for your
    light curve format will be used here.

minbinelems : int
    The minimum number of time-bin elements required to accept a time-bin as
    valid for the output binned light curve.

nworkers : int
    Number of parallel workers to launch.

maxworkertasks : int
    The maximum number of tasks a parallel worker will complete before being
    replaced to guard against memory leaks.

Returns
-------

dict
    The returned dict contains keys = input LCs, vals = output LCs.