Color scheme: Riviera
You are here: start » en » Documentation » Microsoft Access development tools » WKL Forms Object Library » WKL Forms Object Library API reference » WklTimerTask

WklTimerTask

WklTimerTask class

Signature

Dim myWklTimerTask As WklTimerTask

Summary

One scheduled task of a WklTimerList.

Parameters

None

Remarks

Not created directly; returned by other members of the library.

MemberKindSummary
`Key`PropertyGets the key of the task.
`Enabled`PropertyGets or sets whether the task takes part.
`Kind`PropertyGets or sets the kind of work.
`Delay`PropertyGets or sets the first due time in milliseconds after Start.
`StartAt`PropertyGets or sets the first due time as a local clock time.
`Interval`PropertyGets or sets the repetition in milliseconds.
`Overlap`PropertyGets or sets what happens with due times that pass while a run is still going.
`Timeout`PropertyGets or sets the time limit of a run in milliseconds.
`Retries`PropertyGets or sets how often a failed run is repeated.
`RetryDelay`PropertyGets or sets the wait before a repetition in milliseconds.
`Tag`PropertyGets or sets any value passed unchanged to TaskDue.
`State`PropertyGets the state of the task.
`RunCount`PropertyGets the number of runs.
`LastRun`PropertyGets the local time the last run began.
`NextRun`PropertyGets the local time of the next due time.
`LastError`PropertyGets the text of the last failure.
`Start`MethodStarts the task.
`Stop`MethodStops the task.
`Pause`MethodPauses the task; the time left is kept.
`Resume`MethodResumes a paused task, or a web request queue halted by an answer 401.
`Trigger`MethodMakes the task due now.
`Restart`MethodBegins the delay again from now.
`Requests`PropertyGets the requests of a web request queue.
`SharedHeader`PropertyGets or sets a header sent with every request of the queue.
`MinGap`PropertyGets or sets the least time between two request starts in milliseconds.
`RateLimit`PropertyGets or sets the most request starts per RateWindow.
`RateWindow`PropertyGets or sets the time window of RateLimit in milliseconds.
`UseWindowsLogin`PropertyGets or sets whether the queue signs in with the Windows account of Access.
`Halted`PropertyGets whether the queue waits for Resume after an answer 401.
`PausedUntil`PropertyGets the end of a pause after an answer 429.

Code example

None

Inheritance

None

Key property

Signature

Property Get Key() As String

Summary

Gets the key of the task.

Parameters

None

Property value: String – The key.

Remarks

Default member: it can be left out, as in myWklTimerTask(...) for myWklTimerTask.Key(...). Read-only.

Code example

None

Inheritance

Declared by WklTimerTask.

Enabled property

Signature

Property Get Enabled() As Boolean
Property Let Enabled(RHS As Boolean)

Summary

Gets or sets whether the task takes part.

Parameters

None

Property value: Boolean – True (default): it runs; False: never due, also not on Trigger.

Remarks

Read/write.

Code example

None

Inheritance

Declared by WklTimerTask.

Kind property

Signature

Property Get Kind() As WklTimerTaskKind
Property Let Kind(RHS As WklTimerTaskKind)

Summary

Gets or sets the kind of work.

Parameters

None

Property value: `WklTimerTaskKind` – wttEvent or wttHttp in this version.

Remarks

Read/write.

Code example

None

Inheritance

Declared by WklTimerTask.

Delay property

Signature

Property Get Delay() As Long
Property Let Delay(RHS As Long)

Summary

Gets or sets the first due time in milliseconds after Start.

Parameters

None

Property value: Long – 0 or more (default 0).

Remarks

Used when StartAt is Null. Restart begins the delay again: the delayed search after each key press.

Read/write.

Code example

None

Inheritance

Declared by WklTimerTask.

StartAt property

Signature

Property Get StartAt() As Variant
Property Let StartAt(RHS As Variant)

Summary

Gets or sets the first due time as a local clock time.

Parameters

None

Property value: Variant – A date and time, or Null (default).

Remarks

In the past without Interval the task is due at once; with Interval, at the next time of the series after now. Not stored with the form.

Read/write.

Code example

None

Inheritance

Declared by WklTimerTask.

Interval property

Signature

Property Get Interval() As Long
Property Let Interval(RHS As Long)

Summary

Gets or sets the repetition in milliseconds.

Parameters

None

Property value: Long – 0 (default): once.

Remarks

Counted from the due time, not from the end of the run.

Read/write.

Code example

None

Inheritance

Declared by WklTimerTask.

Overlap property

Signature

Property Get Overlap() As WklTimerOverlap
Property Let Overlap(RHS As WklTimerOverlap)

Summary

Gets or sets what happens with due times that pass while a run is still going.

Parameters

None

Property value: `WklTimerOverlap` – wtoSkip (default): dropped; wtoOnce: one run follows right after.

Remarks

Read/write.

Code example

None

Inheritance

Declared by WklTimerTask.

Timeout property

Signature

Property Get Timeout() As Long
Property Let Timeout(RHS As Long)

Summary

Gets or sets the time limit of a run in milliseconds.

Parameters

None

Property value: Long – 0 (default): none.

Remarks

For a web request queue the limit applies to each request. A wttEvent run is the event procedure and cannot be interrupted.

Read/write.

Code example

None

Inheritance

Declared by WklTimerTask.

Retries property

Signature

Property Get Retries() As Long
Property Let Retries(RHS As Long)

Summary

Gets or sets how often a failed run is repeated.

Parameters

None

Property value: Long – 0 or more (default 0).

Remarks

For a web request queue: per request, only without answer.

Read/write.

Code example

None

Inheritance

Declared by WklTimerTask.

RetryDelay property

Signature

Property Get RetryDelay() As Long
Property Let RetryDelay(RHS As Long)

Summary

Gets or sets the wait before a repetition in milliseconds.

Parameters

None

Property value: Long – 0 or more (default 1000).

Remarks

Read/write.

Code example

None

Inheritance

Declared by WklTimerTask.

Tag property

Signature

Property Get Tag() As Variant
Property Let Tag(RHS As Variant)

Summary

Gets or sets any value passed unchanged to TaskDue.

Parameters

None

Property value: Variant – Any value, also an object.

Remarks

Not stored with the form.

Read/write.

Code example

None

Inheritance

Declared by WklTimerTask.

State property

Signature

Property Get State() As WklTimerTaskState

Summary

Gets the state of the task.

Parameters

None

Property value: `WklTimerTaskState` – wtsStopped, wtsWaiting, wtsRunning, wtsPaused or wtsDone.

Remarks

Read-only.

Code example

None

Inheritance

Declared by WklTimerTask.

RunCount property

Signature

Property Get RunCount() As Long

Summary

Gets the number of runs.

Parameters

None

Property value: Long – Repetitions after a failure are not counted.

Remarks

Read-only.

Code example

None

Inheritance

Declared by WklTimerTask.

LastRun property

Signature

Property Get LastRun() As Variant

Summary

Gets the local time the last run began.

Parameters

None

Property value: Variant – A date and time, or Null.

Remarks

Read-only.

Code example

None

Inheritance

Declared by WklTimerTask.

NextRun property

Signature

Property Get NextRun() As Variant

Summary

Gets the local time of the next due time.

Parameters

None

Property value: Variant – A date and time, or Null when nothing is due.

Remarks

Read-only.

Code example

None

Inheritance

Declared by WklTimerTask.

LastError property

Signature

Property Get LastError() As String

Summary

Gets the text of the last failure.

Parameters

None

Property value: String – Empty after a successful run.

Remarks

Read-only.

Code example

None

Inheritance

Declared by WklTimerTask.

Start method

Signature

Sub Start()

Summary

Starts the task.

Parameters

None

Remarks

None

Code example

None

Inheritance

Declared by WklTimerTask.

Stop method

Signature

Sub Stop()

Summary

Stops the task.

Parameters

None

Remarks

A running run ends normally and is reported; requests not yet sent stay in the queue.

Code example

None

Inheritance

Declared by WklTimerTask.

Pause method

Signature

Sub Pause()

Summary

Pauses the task; the time left is kept.

Parameters

None

Remarks

None

Code example

None

Inheritance

Declared by WklTimerTask.

Resume method

Signature

Sub Resume()

Summary

Resumes a paused task, or a web request queue halted by an answer 401.

Parameters

None

Remarks

None

Code example

None

Inheritance

Declared by WklTimerTask.

Trigger method

Signature

Sub Trigger()

Summary

Makes the task due now.

Parameters

None

Remarks

During a run, wtoOnce notes one more run; wtoSkip ignores it.

Code example

None

Inheritance

Declared by WklTimerTask.

Restart method

Signature

Sub Restart()

Summary

Begins the delay again from now.

Parameters

None

Remarks

The delayed search: call it in the Change event of the search box.

Code example

None

Inheritance

Declared by WklTimerTask.

Requests property

Signature

Property Get Requests() As WklHttpRequests

Summary

Gets the requests of a web request queue.

Parameters

None

Property value: `WklHttpRequests` – The collection of requests.

Remarks

Only for wttHttp; other kinds refuse with wkeNotAvailable.

Read-only.

Code example

None

Inheritance

Declared by WklTimerTask.

SharedHeader property

Signature

Property Get SharedHeader(ByVal Name As String) As String
Property Let SharedHeader(ByVal Name As String, RHS As String)

Summary

Gets or sets a header sent with every request of the queue.

Parameters

NameTypeOptionalDefaultDescription
NameStringNo–The header name.

Property value: String – The value; an empty value removes the header.

Remarks

For API keys, authorization and the session header of a second factor. Read at every send, so a new value applies to every request still waiting. Kept in memory only, never stored with the form or written to the trace.

Read/write.

Code example

None

Inheritance

Declared by WklTimerTask.

MinGap property

Signature

Property Get MinGap() As Long
Property Let MinGap(RHS As Long)

Summary

Gets or sets the least time between two request starts in milliseconds.

Parameters

None

Property value: Long – 0 (default): none.

Remarks

Read/write.

Code example

None

Inheritance

Declared by WklTimerTask.

RateLimit property

Signature

Property Get RateLimit() As Long
Property Let RateLimit(RHS As Long)

Summary

Gets or sets the most request starts per RateWindow.

Parameters

None

Property value: Long – 0 (default): no limit.

Remarks

RateLimit and RateWindow can be set in any order. Start of a queue with a RateLimit but no RateWindow is refused with wkeInvalidValue.

Read/write.

Code example

None

Inheritance

Declared by WklTimerTask.

RateWindow property

Signature

Property Get RateWindow() As Long
Property Let RateWindow(RHS As Long)

Summary

Gets or sets the time window of RateLimit in milliseconds.

Parameters

None

Property value: Long – For example 60000 for a limit per minute.

Remarks

Read/write.

Code example

None

Inheritance

Declared by WklTimerTask.

UseWindowsLogin property

Signature

Property Get UseWindowsLogin() As Boolean
Property Let UseWindowsLogin(RHS As Boolean)

Summary

Gets or sets whether the queue signs in with the Windows account of Access.

Parameters

None

Property value: Boolean – False (default).

Remarks

Answers a Negotiate or NTLM challenge of the service; without it no Windows credentials are sent.

Read/write.

Code example

None

Inheritance

Declared by WklTimerTask.

Halted property

Signature

Property Get Halted() As Boolean

Summary

Gets whether the queue waits for Resume after an answer 401.

Parameters

None

Property value: Boolean – True while halted.

Remarks

Read-only.

Code example

None

Inheritance

Declared by WklTimerTask.

PausedUntil property

Signature

Property Get PausedUntil() As Variant

Summary

Gets the end of a pause after an answer 429.

Parameters

None

Property value: Variant – A local date and time, or Null.

Remarks

Read-only.

Code example

None

Inheritance

Declared by WklTimerTask.

en/wiki/msaccess/comctl/api-reference/wkltimertask.txt · Last modified: by Wolfgang van der Stille