Applies to: desktop apps only
A concrete version of Job. This class represents a generic and instantiable unit of work, such as a batch or a print job.
The following syntax is simplified from Managed Object Format (MOF) code and includes all of the inherited properties.
Syntax
class CIM_ConcreteJob : CIM_Job
{
string Caption;
string Description;
datetime ElapsedTime;
datetime InstallDate;
string JobStatus;
string Name;
string Notify;
string Owner;
uint32 Priority;
datetime StartTime;
string Status;
datetime TimeSubmitted;
datetime UntilTime;
string InstanceID;
string Name;
uint16 JobState;
datetime TimeOfLastStateChange;
datetime TimeBeforeRemoval = 00000000000500.000000:000";
};
Members
The CIM_ConcreteJob class has these types of members:
Methods
The CIM_ConcreteJob class has these methods.
| Method | Description |
|---|---|
| GetError |
When the job is executing or has terminated without error, then this method returns no CIM_Error instance. However, if the job has failed because of some internal problem or because the job has been terminated by a client, then a CIM_Error instance is returned. |
| RequestStateChange |
Requests that the state of the job be changed to the value specified in the RequestedState parameter. Invoking the RequestStateChange method multiple times could result in earlier requests being overwritten or lost. If zero is returned, then the task completed successfully. Any other return code indicates an error condition. |
Properties
The CIM_ConcreteJob class has these properties.
- Caption
-
- Data type: string
- Access type: Read-only
Short textual description of the object. This property is inherited from CIM_ManagedSystemElement.
- Description
-
- Data type: string
- Access type: Read-only
Textual description of the object. This property is inherited from CIM_ManagedSystemElement.
- ElapsedTime
-
- Data type: datetime
- Access type: Read-only
Length of time the job has been executing.
- InstallDate
-
- Data type: datetime
- Access type: Read-only
Date and time the object was installed. This property does not need a value to indicate that the object is installed. This property is inherited from CIM_ManagedSystemElement.
- InstanceID
-
- Data type: string
- Access type: Read-only
- Qualifiers: Key
Within the scope of the instantiating Namespace, InstanceID opaquely and uniquely identifies an instance of this class. In order to ensure uniqueness within the NameSpace, the value of InstanceID should be constructed using the following 'preferred' algorithm: OrgID:LocalID Where OrgID and LocalID are separated by a colon (:), and where OrgID must include a copyrighted, trademarked or otherwise unique name that is owned by the business entity that is creating or defining the InstanceID, or that is a registered ID that is assigned to the business entity by a recognized global authority. (This requirement is similar to the SchemaName_ClassName structure of Schema class names.) In addition, to ensure uniqueness OrgID must not contain a colon (:). When using this algorithm, the first colon to appear in InstanceID must appear between OrgID and LocalID. LocalID is chosen by the business entity and should not be reused to identify different underlying (real-world) elements. If the above 'preferred' algorithm is not used, the defining entity must assure that the resulting InstanceID is not reused across any InstanceIDs produced by this or other providers for the NameSpace of this instance. For DMTF defined instances, the 'preferred' algorithm must be used with the OrgID set to 'CIM'.
- JobState
-
- Data type: uint16
- Access type: Read-only
JobState is an integer enumeration that indicates the operational state of a Job. It can also indicate transitions between these states, for example, 'Shutting Down' and 'Starting'.
- JobStatus
-
- Data type: string
- Access type: Read-only
Free-form string that represents the job status.
- Name
-
- Data type: string
- Access type: Read-only
Label by which the object is known. When subclassed, this property can be overridden to be a key property. This property is inherited from CIM_ManagedSystemElement.
- Name
-
- Data type: string
- Access type: Read-only
The display name for this instance of a Job. In addition, the display name can be used as a property for a search or query. (Note: Name does not have to be unique within a namespace.)
- Notify
-
- Data type: string
- Access type: Read-only
User is notified upon job completion or failure.
- Owner
-
- Data type: string
- Access type: Read-only
User who submitted the job.
- Priority
-
- Data type: uint32
- Access type: Read-only
Importance of a job's execution.
- StartTime
-
- Data type: datetime
- Access type: Read-only
Time that the job began.
- Status
-
- Data type: string
- Access type: Read-only
Current status of the object. This property is inherited from CIM_ManagedSystemElement.
Values include the following:
- "OK"
- "Error"
- "Degraded"
- "Unknown"
- "Pred Fail"
- "Starting"
- "Stopping"
- "Service"
- "Stressed"
- "NonRecover"
- "No Contact"
- "Lost Comm"
- TimeBeforeRemoval
-
- Data type: datetime
- Access type: Write-only
The amount of time that the Job is retained after it has finished executing, either succeeding or failing in that execution. The job must remain in existence for some period of time regardless of the value of the DeleteOnCompletion property. The default is five minutes.
- TimeOfLastStateChange
-
- Data type: datetime
- Access type: Read-only
The date or time when the state of the Job last changed. If the state of the Job has not changed and this property is populated, then it must be set to a 0 interval value. If a state change was requested, but rejected or not yet processed, the property must not be updated.
- TimeSubmitted
-
- Data type: datetime
- Access type: Read-only
Time that the job was submitted.
- UntilTime
-
- Data type: datetime
- Access type: Read-only
Time at which the job is invalid or should be stopped.
Requirements
|
Namespace |
\root\CIMV2 |
|---|
See also
Send comments about this topic to Microsoft
Build date: 3/9/2012