You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: x-pack/plugins/task_manager/server/README.md
+20-4Lines changed: 20 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -141,18 +141,34 @@ When Kibana attempts to claim and run a task instance, it looks its definition u
141
141
## Task result
142
142
143
143
The task runner's `run` method is expected to return a promise that resolves to undefined or to an object that looks like the following:
144
+
145
+
|Property|Description|Type|
146
+
|---|---|---|
147
+
|runAt| Optional. If specified, this is used as the tasks' next `runAt`, overriding the default system scheduler. | Date ISO String |
148
+
|schedule| Optional. If specified, this is used as the tasks' new recurring schedule, overriding the default system scheduler and any existing schedule. | { interval: string } |
149
+
|error| Optional, an error object, logged out as a warning. The pressence of this property indicates that the task did not succeed.| Error |
150
+
|state| Optional, this will be passed into the next run of the task, if this is a recurring task. |Record<string, unknown>|
151
+
152
+
### Examples
153
+
144
154
```js
145
155
{
146
156
// Optional, if specified, this is used as the tasks' nextRun, overriding
147
157
// the default system scheduler.
148
158
runAt:"2020-07-24T17:34:35.272Z",
149
159
150
-
// Optional, an error object, logged out as a warning. The pressence of this
151
-
// property indicates that the task did not succeed.
152
160
error: { message:'Hrumph!' },
153
161
154
-
// Optional, this will be passed into the next run of the task, if
0 commit comments