xgt.Job

class xgt.Job(conn, data)

Represents a user-scheduled Job.

An instance of this object is created by job-scheduling functions like xgt.Connection.run_job and xgt.Connection.schedule_job.

A Job is used as a proxy for a job in the server and allows the user to monitor its execution, possibly cancel it, and learn about its status during and after execution.

__init__(conn, data)

x.__init__(…) initializes x; see help(type(x)) for signature

Methods

__init__(conn, data) x.__init__(…) initializes x; see help(type(x)) for signature

Attributes

end_time Date and time when the job finished running.
error User-friendly error message describing the reason a job failed.
id Identifier of the job.
start_time Date and time when the job was scheduled.
status Status of the job.
trace Very detailed error message for a failed job.
end_time

Date and time when the job finished running.

This is a formatted string that has a resolution of seconds.

Type:str
error

User-friendly error message describing the reason a job failed.

Type:str
id

Identifier of the job.

A 64-bit integer value that uniquely identifies a job. It is automatically incremented for each scheduled job over the lifetime of the xgtd server process.

Type:int
start_time

Date and time when the job was scheduled.

This is a formatted string that has a resolution of seconds.

Type:str
status

Status of the job.

Job status
Status Description
scheduled The state after the job has been created, but before it has started running.
running The job is being executed.
completed The job finished successfully.
canceled The job was canceled.
failed The job failed. When the job fails the error and trace properties are populated.
Type:str
trace

Very detailed error message for a failed job.

This error message contains the friendly error message and a stack strace for the code that participated in the error.

Type:str