interface RepeatingTask {
    setInterval(ms): void;
    setTimeout(ms): void;
    start(): void;
    stop(): void;
}

Methods

  • Update the interval after which the next iteration of the task will run.

    This is useful if, for example, you want to retry a task with a short rest duration until it succeeds, then periodically after that.

    This only affects the next iteration of the task, if it is currently running, that run will not be interrupted.

    Parameters

    • ms: number

    Returns void

  • Update the amount of time a task will run before the passed abort signal will fire.

    • This only affects the next iteration of the task, if it is currently running, that run will not be interrupted.

    Parameters

    • ms: number

    Returns void