The options to use when creating a Repeat instance

Hierarchy

  • RepeatOptions

Properties

maxFailures?: number

The maximum number of consecutive failures to allow before terminating the operation

Remarks

If set, onFail will be called once after the last failed repetition

Default

Infinity

maxRuns?: number

The maximum number of repetitions to perform before terminating

Remarks

If set, onComplete will be called once after the last repetition

Default

Infinity

onComplete?: OnComplete

Called once after maxRuns is reached

onError?: OnError

Called whenever RepeatTask throws an error

onFail?: OnFail

Called once after maxFailures is reached

onStart?: OnStart

Called once at the start of the operation

runOnStart?: boolean

Run task immediately after start is called, otherwise wait until the first timeout is reached

Default

true

startOnInit?: boolean

Start the repeat operation immediately after Repeat is created, otherwise wait until start is called

Default

true

timeout?: number

The number of milliseconds to wait between each repetition

Generated using TypeDoc