CIM_ConcreteJob class (Windows)

Switch View :
ScriptFree
CIM_ConcreteJob class

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.

MethodDescription
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'.

ValueMeaning
New
2

The job has never been started.

Starting
3

The job is moving from the 'New', 'Suspended', or 'Service' states into the 'Running' state.

Running
4

The job is running.

Suspended
5

The job is stopped, but can be restarted in a seamless manner.

Shutting Down
6

The job is moving to a 'Completed', 'Terminated', or 'Killed' state.

Completed
7

The job has completed normally.

Terminated
8

The job has been stopped by a 'Terminate' state change request. The job and all its underlying processes are ended and can be restarted (this is job-specific) only as a new job.

Killed
9

The job has been stopped by a 'Kill' state change request. Underlying processes might have been left running, and cleanup might be required to free up resources.

Exception
10

The job is in an abnormal state that might be indicative of an error condition. Actual status might be displayed though job-specific objects.

Service
11

The job is in a vendor-specific state that supports problem discovery, or resolution, or both.

DMTF Reserved
12..32767

Reserved.

Vendor Reserved
32768..65535

Reserved.

 

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

CIM_Job

 

 

Send comments about this topic to Microsoft

Build date: 3/9/2012