/**
 * DurationUnit type.
  @typedef {keyof typeof DURATION_MULTIPLIERS} DurationUnit */
/**
 * Runs the parseScheduledDuration helper.
 * @param {number | string} value - Duration value.
 * @param {string} fieldName - Field name for errors.
 * @returns {number} - Duration in milliseconds.
 */
export function parseScheduledDuration(value: number | string, fieldName: string): number;
/** Runs configured recurring background job schedules. */
export default class BackgroundJobsScheduler {
    /**
     * Runs constructor.
     * @param {object} args - Options.
     * @param {import("../configuration.js").default} args.configuration - Configuration.
     * @param {function({args: Array<?>, jobClass: typeof import("./job.js").default, jobKey: string, options: import("./types.js").BackgroundJobOptions}) : Promise<void>} args.enqueueJob - Enqueue callback.
     */
    constructor({ configuration, enqueueJob }: {
        configuration: import("../configuration.js").default;
        enqueueJob: (arg0: {
            args: Array<unknown>;
            jobClass: typeof import("./job.js").default;
            jobKey: string;
            options: import("./types.js").BackgroundJobOptions;
        }) => Promise<void>;
    });
    configuration: import("../configuration.js").default;
    enqueueJob: (arg0: {
        args: Array<unknown>;
        jobClass: typeof import("./job.js").default;
        jobKey: string;
        options: import("./types.js").BackgroundJobOptions;
    }) => Promise<void>;
    logger: Logger;
    /**
     * Narrows the runtime value to the documented type.
      @type {Array<ReturnType<typeof setInterval>>} */
    intervalIds: Array<ReturnType<typeof setInterval>>;
    /**
     * Narrows the runtime value to the documented type.
      @type {Array<ReturnType<typeof setTimeout>>} */
    timeoutIds: Array<ReturnType<typeof setTimeout>>;
    /**
     * Narrows the runtime value to the documented type.
     * @type {boolean} - True between stop() and the next start(); cron self-rescheduler checks this so a stop() during an in-flight enqueue doesn't immediately re-arm.
     */
    stopped: boolean;
    /**
     * Runs start.
      @returns {Promise<void>} */
    start(): Promise<void>;
    /**
     * Runs stop.
      @returns {void} */
    stop(): void;
    /**
     * Runs schedule job.
     * @param {object} args - Options.
     * @param {import("../configuration-types.js").ScheduledBackgroundJobConfiguration} args.jobConfiguration - Job configuration.
     * @param {string} args.jobKey - Job key.
     * @returns {void}
     */
    scheduleJob({ jobConfiguration, jobKey }: {
        jobConfiguration: import("../configuration-types.js").ScheduledBackgroundJobConfiguration;
        jobKey: string;
    }): void;
    /**
     * Runs schedule every job.
     * @param {object} args - Options.
     * @param {import("../configuration-types.js").ScheduledBackgroundJobConfiguration} args.jobConfiguration - Job configuration.
     * @param {string} args.jobKey - Job key.
     * @returns {void}
     */
    scheduleEveryJob({ jobConfiguration, jobKey }: {
        jobConfiguration: import("../configuration-types.js").ScheduledBackgroundJobConfiguration;
        jobKey: string;
    }): void;
    /**
     * Crontab schedules don't have a constant interval (`0 9 * * 1-5`
     * fires once per weekday at 9 AM, with gaps of varying length), so
     * we self-reschedule with `setTimeout` after every fire instead of
     * using `setInterval`.
     * @param {object} args - Options.
     * @param {import("../configuration-types.js").ScheduledBackgroundJobConfiguration} args.jobConfiguration - Job configuration.
     * @param {string} args.jobKey - Job key.
     * @returns {void}
     */
    scheduleCronJob({ jobConfiguration, jobKey }: {
        jobConfiguration: import("../configuration-types.js").ScheduledBackgroundJobConfiguration;
        jobKey: string;
    }): void;
    /**
     * Runs enqueue scheduled job.
     * @param {object} args - Options.
     * @param {import("../configuration-types.js").ScheduledBackgroundJobConfiguration} args.jobConfiguration - Job configuration.
     * @param {string} args.jobKey - Job key.
     * @returns {Promise<void>}
     */
    enqueueScheduledJob({ jobConfiguration, jobKey }: {
        jobConfiguration: import("../configuration-types.js").ScheduledBackgroundJobConfiguration;
        jobKey: string;
    }): Promise<void>;
    /**
     * Runs normalize every.
     * @param {NonNullable<import("../configuration-types.js").ScheduledBackgroundJobConfiguration["every"]>} every - Every config (caller must guarantee not undefined).
     * @returns {{everyValue: number | string, firstInValue?: number | string}} - Normalized interval and first-run delay values.
     */
    normalizeEvery(every: NonNullable<import("../configuration-types.js").ScheduledBackgroundJobConfiguration["every"]>): {
        everyValue: number | string;
        firstInValue?: number | string;
    };
}
/**
 * DurationUnit type.
 */
export type DurationUnit = keyof typeof DURATION_MULTIPLIERS;
import Logger from "../logger.js";
declare namespace DURATION_MULTIPLIERS {
    let d: number;
    let day: number;
    let days: number;
    let h: number;
    let hour: number;
    let hours: number;
    let m: number;
    let minute: number;
    let minutes: number;
    let ms: number;
    let s: number;
    let second: number;
    let seconds: number;
    let w: number;
    let week: number;
    let weeks: number;
}
export {};
//# sourceMappingURL=scheduler.d.ts.map