{
    "title": "running task",
    "id": "schemas/job/runningTask",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "javaType": "com.sos.joc.model.job.RunningTask",
    "description": "task object of an order job which is running",
    "required": [
        "taskId",
        "startedAt"
    ],
    "properties": {
        "taskId": {
            "type": "string"
        },
        "pid": {
            "type": "integer"
        },
        "startedAt": {
            "id": "schemas/common/timestamp",
            "description": "Value is UTC timestamp in ISO 8601 YYYY-MM-DDThh:mm:ss.sZ or empty",
            "type": "string",
            "format": "date-time"
        },
        "enqueued": {
            "id": "schemas/common/timestamp",
            "description": "Value is UTC timestamp in ISO 8601 YYYY-MM-DDThh:mm:ss.sZ or empty",
            "type": "string",
            "format": "date-time"
        },
        "idleSince": {
            "id": "schemas/common/timestamp",
            "description": "Value is UTC timestamp in ISO 8601 YYYY-MM-DDThh:mm:ss.sZ or empty",
            "type": "string",
            "format": "date-time"
        },
        "steps": {
            "type": "integer"
        },
        "_cause": {
            "id": "schemas/job/taskCause",
            "description": "For order jobs only cause=order possible",
            "javaType": "com.sos.joc.model.job.TaskCause",
            "type": "string",
            "enum": [
                "NONE",
                "MIN_TASKS",
                "PERIOD_ONCE",
                "PERIOD_SINGLE",
                "PERIOD_REPEAT",
                "QUEUE",
                "QUEUE_AT",
                "DIRECTORY",
                "DELAY_AFTER_ERROR",
                "ORDER"
            ]
        },
        "order": {
            "id": "schemas/job/orderOfTask",
            "description": "Only relevant for order jobs; cause=order resp.",
            "javaType": "com.sos.joc.model.job.OrderOfTask",
            "type": "object",
            "required": [
                "path",
                "orderId",
                "jobChain",
                "state"
            ],
            "properties": {
                "path": {
                    "id": "schemas/common/path",
                    "description": "absolute path based on live folder of a JobScheduler object.",
                    "type": "string",
                    "pattern": "/([^/]+/)*[^/]+"
                },
                "orderId": {
                    "type": "string"
                },
                "jobChain": {
                    "id": "schemas/common/path",
                    "description": "absolute path based on live folder of a JobScheduler object.",
                    "type": "string",
                    "pattern": "/([^/]+/)*[^/]+"
                },
                "title": {
                    "type": "string"
                },
                "state": {
                    "description": "name of the current node",
                    "type": "string"
                },
                "inProcessSince": {
                    "id": "schemas/common/timestamp",
                    "description": "Value is UTC timestamp in ISO 8601 YYYY-MM-DDThh:mm:ss.sZ or empty",
                    "type": "string",
                    "format": "date-time"
                }
            }
        }
    }
}