1.7 KiB
1.7 KiB
title | description | menu | weight | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
tasks.lastSuccess() function | `tasks.lastSuccess()` returns the time of the last successful run of the InfluxDB task or the value of the `orTime` parameter if the task has never successfully run. |
|
301 |
tasks.lastSuccess()
returns the time of the last successful run of the InfluxDB task
or the value of the orTime
parameter if the task has never successfully run.
Function type signature
(orTime: A) => time where A: Timeable
{{% caption %}} For more information, see Function type signatures. {{% /caption %}}
Parameters
orTime
({{< req >}}) Default time value returned if the task has never successfully run.
Examples
Return the time an InfluxDB task last successfully ran
import "influxdata/influxdb/tasks"
tasks.lastSuccess(orTime: 2020-01-01T00:00:00Z)