export interface ExecOption { // 进程的uid,不填会自动生成 uid?: string; // 最大执行次数,默认无限,填1只执行一次 max?: number; // 间隔执行时间 spinSleepTime?: number; // 退出时子进程是否退出 killTree?: boolean; // 进程文件目录 pidFile?: string; // 是否观察目录文件变化重启 watch?: boolean; // 是否忽略点开头的文件 watchIgnoreDotFiles?: boolean; // 需要忽略的文件 watchIgnorePatterns?: string[]; // 要观察的目录 watchDirectory?: string; // 环境变量定义 env?: { [name: string]: string }; // 当前工作路径 cwd?: string; // 主进程等待WaitExit的时间,默认200ms stopMinTimeout?: number; // 主进程等待CanExit的最长时间,默认60000ms stopMaxTimeout?: number; } export enum ProcessEvent { TryExit = "TryExit", WaitExit = "WaitExit", CanExit = "CanExit", }