Task

public struct Task : Codable
  • Declaration

    Swift

    public enum LastRunStatus : String, Codable, CaseIterable
  • id

    Declaration

    Swift

    public var id: String
  • Type of the task, useful for filtering a task list.

    Declaration

    Swift

    public var type: String?
  • ID of the organization that owns the task.

    Declaration

    Swift

    public var orgID: String
  • org

    Name of the organization that owns the task.

    Declaration

    Swift

    public var org: String?
  • Name of the task.

    Declaration

    Swift

    public var name: String
  • ID of the user who owns this Task.

    Declaration

    Swift

    public var ownerID: String?
  • Description of the task.

    Declaration

    Swift

    public var description: String?
  • Declaration

    Swift

    public var status: TaskStatusType?
  • Declaration

    Swift

    public var labels: [Label]?
  • ID of the authorization used when the task communicates with the query engine.

    Declaration

    Swift

    public var authorizationID: String?
  • Flux script to run for this task.

    Declaration

    Swift

    public var flux: String
  • Interval at which the task runs. `every` also determines when the task first runs, depending on the specified time. Value is a duration literal).

    Declaration

    Swift

    public var every: String?
  • Cron expression that defines the schedule on which the task runs. Cron scheduling is based on system time. Value is a Cron expression.

    Declaration

    Swift

    public var cron: String?
  • Duration to delay execution of the task after the scheduled time has elapsed. `0` removes the offset. The value is a duration literal.

    Declaration

    Swift

    public var offset: String?
  • Timestamp of the latest scheduled and completed run. Value is a timestamp in RFC3339 date/time format.

    Declaration

    Swift

    public var latestCompleted: Date?
  • Declaration

    Swift

    public var lastRunStatus: LastRunStatus?
  • Declaration

    Swift

    public var lastRunError: String?
  • Declaration

    Swift

    public var createdAt: Date?
  • Declaration

    Swift

    public var updatedAt: Date?
  • Declaration

    Swift

    public var links: TaskLinks?
  • Declaration

    Swift

    public init(id: String, type: String? = nil, orgID: String, org: String? = nil, name: String, ownerID: String? = nil, description: String? = nil, status: TaskStatusType? = nil, labels: [Label]? = nil, authorizationID: String? = nil, flux: String, every: String? = nil, cron: String? = nil, offset: String? = nil, latestCompleted: Date? = nil, lastRunStatus: LastRunStatus? = nil, lastRunError: String? = nil, createdAt: Date? = nil, updatedAt: Date? = nil, links: TaskLinks? = nil)