import { Collection } from 'mongodb'; export interface MongoCronCfg { collection: Collection | (() => Collection); condition?: any; nextDelay?: number; reprocessDelay?: number; idleDelay?: number; lockDuration?: number; sleepUntilFieldPath?: string; intervalFieldPath?: string; repeatUntilFieldPath?: string; autoRemoveFieldPath?: string; onDocument?(doc: any): (any | Promise); onStart?(doc: any): (any | Promise); onStop?(): (any | Promise); onIdle?(): (any | Promise); onError?(err: any): (any | Promise); } export declare class MongoCron { protected running: boolean; protected processing: boolean; protected idle: boolean; protected readonly config: MongoCronCfg; constructor(config: MongoCronCfg); protected getCollection(): Collection; isRunning(): boolean; isProcessing(): boolean; isIdle(): boolean; start(): Promise; stop(): Promise; protected tick(): Promise; protected lockNext(): Promise>; protected getNextStart(doc: any): Date; reschedule(doc: any): Promise; }