job.execution.started
A job started a device. The gateway sends it when the job takes the device (its wave has started, max_concurrent leaves room and its window is open), just before it starts the device’s action. Envelope: endpoint and device are the device’s, package is “houradvantage-connect”. Sent once per device and attempt.
Schema id: urn:houradvantage:events:3:job.execution.started
Fields
| Field | Type | Required | Description |
|---|---|---|---|
job_id | integer | yes | The job’s id (GET /api/tenants/{tenant}/jobs/{id}). |
name | string | The job’s name. Absent when the job was created without one. | |
action | string | yes | The action the device runs: a standard action, or a package action or command. |
state | "queued" \ | "waiting_window" \ | "running" \ |
wave | integer | yes | The device’s wave, counted from 0. at least 0 |
attempt | integer | yes | Which attempt this is: 1, then one more each time retry-failed takes the device again. at least 1 |
action_id | integer | Absent in this event: the action is started after it is sent. The device’s next job.execution event gives it. | |
detail | string | Absent in this event. |
Example
{ "job_id": 7, "name": "volume", "action": "set_settings", "state": "running", "wave": 0, "attempt": 1}JSON Schema
job.execution.started.json
{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "urn:houradvantage:events:3:job.execution.started", "title": "job.execution.started: data", "description": "A job started a device. The gateway sends it when the job takes the device (its wave has started, max_concurrent leaves room and its window is open), just before it starts the device's action. Envelope: `endpoint` and `device` are the device's, `package` is \"houradvantage-connect\". Sent once per device and attempt.", "type": "object", "properties": { "job_id": { "type": "integer", "description": "The job's id (`GET /api/tenants/{tenant}/jobs/{id}`)." }, "name": { "type": "string", "description": "The job's name. Absent when the job was created without one." }, "action": { "type": "string", "description": "The action the device runs: a standard action, or a package action or command." }, "state": { "enum": [ "queued", "waiting_window", "running", "succeeded", "failed", "timed_out", "cancelled" ], "description": "Where the device stands in the job. In this event: always running." }, "wave": { "type": "integer", "minimum": 0, "description": "The device's wave, counted from 0." }, "attempt": { "type": "integer", "minimum": 1, "description": "Which attempt this is: 1, then one more each time retry-failed takes the device again." }, "action_id": { "type": "integer", "description": "Absent in this event: the action is started after it is sent. The device's next job.execution event gives it." }, "detail": { "type": "string", "description": "Absent in this event." } }, "required": [ "job_id", "action", "state", "wave", "attempt" ], "examples": [ { "job_id": 7, "name": "volume", "action": "set_settings", "state": "running", "wave": 0, "attempt": 1 } ]}