UNPKG

@accounter/server

Version:
14 lines (13 loc) 655 B
/** * Schedules a task to run daily at the specified UTC time. * Returns an object with a cancel method to stop the schedule. * * @param hour - The hour (0-23) at which to run the task daily in UTC * @param minute - The minute (0-59) at which to run the task daily in UTC * @param intervalInMs - The interval in milliseconds for subsequent runs after the first execution * @param task - The asynchronous task to execute * @returns An object with a `cancel` method to stop the scheduled task */ export declare function scheduleDailyAtUtc(hour: number, minute: number, intervalInMs: number, task: () => Promise<void>): { cancel: () => void; };