@mtakla/cronops
    Preparing search index...

    Function createJobRunner

    • Creates a JobRunner instance to schedule or execute a single job

      Parameters

      • job: Job

        the job configuration

      • options: {
            configDir?: string;
            gid?: string;
            logDir?: string;
            shell?: string | boolean;
            source2Root?: string;
            source3Root?: string;
            sourceRoot?: string;
            target2Root?: string;
            target3Root?: string;
            targetRoot?: string;
            tempDir?: string;
            uid?: string;
        } = {}

        runner options

        • OptionalconfigDir?: string

          Configuration directory where ./jobs and ./scripts are located. Defaults to ./config

        • Optionalgid?: string

          Default user used to create files and dirs

        • OptionallogDir?: string

          Directory where job logs and job file history is stored Defaults to {os.homedir}/config

        • Optionalshell?: string | boolean

          Default shell to use for exec jobs. Can be false (no shell used, direct os calls), true (use default os shell), or a specific shell like /bin/sh or /bin/bash. Default is false

        • Optionalsource2Root?: string

          Second root directory for job sources. Can be access in job config via dir: "$2/my_source_dir" Defaults to ./

        • Optionalsource3Root?: string

          Third root directory for job sources. Can be access in job config via dir: "$3/my_source_dir" Defaults to ./

        • OptionalsourceRoot?: string

          Default root directory for job sources. Can also be accessed in job source config via dir: "$1/my_source_dir" Defaults to ./

        • Optionaltarget2Root?: string

          Second root directory for job targets. Can also be access in job config via dir: "$2/my_target_dir" Defaults to ./

        • Optionaltarget3Root?: string

          Third root directory for job targets. Can also be access in job config via dir: "$3/my_target_dir" Default is ./

        • OptionaltargetRoot?: string

          Default root directory for job targets. Can also be access in job config via dir: "$1/my_target_dir" Defaults to ./

        • OptionaltempDir?: string

          Temporary directory used as target directory when running jobs in dry_run mode. Defaults to {os.tempdir}/cronops

        • Optionaluid?: string

          Default user used to create files and dirs. no default

      Returns JobRunner

      the created JobRunner instance