Msvm_ConcreteJob class
A concrete version of job. This class represents a generic and instantiatable unit of work, such as a batch or a print job, and is specifically used in Hyper-V to track the progress of asynchronous operations.
The following syntax is simplified Managed Object Format (MOF) code, and it includes all of the inherited properties.
Syntax
[Dynamic, Provider("VmmsWmiInstanceAndMethodProvider"), AMENDMENT]
class Msvm_ConcreteJob : CIM_ConcreteJob
{
string InstanceID;
string Caption;
string Description;
string ElementName;
datetime InstallDate;
string Name;
uint16 OperationalStatus[] = { 2 };
string StatusDescriptions[] = { "OK" };
string Status;
uint16 HealthState = 5;
uint16 CommunicationStatus;
uint16 DetailedStatus;
uint16 OperatingStatus;
uint16 PrimaryStatus;
string JobStatus;
datetime TimeSubmitted;
datetime ScheduledStartTime;
datetime StartTime;
datetime ElapsedTime;
uint32 JobRunTimes;
uint8 RunMonth;
sint8 RunDay;
sint8 RunDayOfWeek;
datetime RunStartInterval;
uint16 LocalOrUtcTime;
datetime UntilTime;
string Notify;
string Owner;
uint32 Priority;
uint16 PercentComplete;
boolean DeleteOnCompletion;
uint16 ErrorCode;
string ErrorDescription;
string ErrorSummaryDescription;
uint16 RecoveryAction;
string OtherRecoveryAction;
uint16 JobState;
datetime TimeOfLastStateChange;
datetime TimeBeforeRemoval =
00000000000500.000000:000
;
boolean Cancellable;
uint16 JobType;
};
Members
The Msvm_ConcreteJob class has these types of members:
Methods
The Msvm_ConcreteJob class has these methods.
Method | Description |
---|---|
GetError | Retrieves the error object for the job, if one exists. |
GetErrorEx | Retrieves the error objects for the job, if any exist. |
KillJob | This method is not supported. |
RequestStateChange | Requests that the state of the job be changed to the specified state. |
Properties
The Msvm_ConcreteJob class has these properties.
-
Cancellable
-
-
Data type: boolean
-
Access type: Read-only
Indicates whether the job can be canceled. The value of this property does not guarantee that a request to cancel the job will succeed.
-
-
Caption
-
-
Data type: string
-
Access type: Read-only
A short description of the object. This property is inherited from CIM_ManagedElement.
-
-
CommunicationStatus
-
-
Data type: uint16
-
Access type: Read-only
Indicates the ability of the instrumentation to communicate with the underlying managed element. A Null value indicates that this property is not implemented. This property is inherited from CIM_ManagedSystemElement.
-
-
DeleteOnCompletion
-
-
Data type: boolean
-
Access type: Read-only
Specifies whether the job should be automatically deleted upon completion. This property is inherited from CIM_Job.
-
-
Description
-
-
Data type: string
-
Access type: Read-only
A description of the object. This property is inherited from CIM_ManagedElement.
-
-
DetailedStatus
-
-
Data type: uint16
-
Access type: Read-only
Compliments the PrimaryStatus property with additional status detail. A Null value indicates that this property is not implemented. This property is inherited from CIM_ManagedSystemElement.
-
-
ElapsedTime
-
-
Data type: datetime
-
Access type: Read-only
The time interval that the job has been executing, or the total execution time if the job is complete. This property is inherited from CIM_Job.
-
-
ElementName
-
-
Data type: string
-
Access type: Read-only
A display name for the object. This property is inherited from CIM_ManagedElement.
-
-
ErrorCode
-
-
Data type: uint16
-
Access type: Read-only
A vendor-specific error code. The value must be set to zero if the job completed without error. This property is inherited from CIM_Job.
-
-
ErrorDescription
-
-
Data type: string
-
Access type: Read-only
A string that contains the vendor error description. This property is inherited from CIM_Job.
-
-
ErrorSummaryDescription
-
-
Data type: string
-
Access type: Read-only
-
Qualifiers: ModelCorrespondence ("CIM_Job.ErrorCode")
A summary description of the error, if present. This property is inherited from CIM_Job.
-
-
HealthState
-
-
Data type: uint16
-
Access type: Read-only
The current health of the element. This attribute expresses the health of this element but not necessarily that of its subcomponents. The possible values are 0 to 30, where 5 means the element is entirely healthy and 30 means the element is completely nonfunctional. This property is inherited from CIM_ManagedSystemElement, and it is always set to 5.
-
-
InstallDate
-
-
Data type: datetime
-
Access type: Read-only
The date and time the virtual machine configuration was created. This property is inherited from CIM_ManagedSystemElement.
-
-
InstanceID
-
-
Data type: string
-
Access type: Read-only
-
Qualifiers: Key
Uniquely identifies an instance of this class. This property is inherited from CIM_ManagedElement, and it is always set to Null.
-
-
JobRunTimes
-
-
Data type: uint32
-
Access type: Read-only
The number of times that the job should be run. A value of 1 indicates that the job is not recurring, while any nonzero value indicates a limit to the number of times that the job will recur. Zero indicates that there is no limit to the number of times that the job can be processed, but it will be terminated either after the UntilTime has been reached, or the job is manually terminated. This property is inherited from CIM_Job.
-
-
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". This property is inherited from CIM_ConcreteJob.
Value Meaning - New
- 2
The job has never been started. - Starting
- 3
The job is moving from the 2 (New), 5 (Suspended), or 11 (Service) states into the 4 (Running) state. - Running
- 4
The job is running. - Suspended
- 5
The job is stopped, but it can be restarted in a seamless manner. - Shutting Down
- 6
The job is moving to a 7 (Completed), 8 (Terminated), or 9 (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 only as a new job. The requirement that the job be restarted only as a new job is job-specific. - Killed
- 9
The job has been stopped by a "Kill" state change request. Underlying processes may still be running, and a clean-up might be required to free up resources. - Exception
- 10
The job is in an abnormal state that might be indicative of an error condition. The actual status of the job might be available through 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
A string that represents the job status. This property is inherited from CIM_Job.
-
-
JobType
-
-
Data type: uint16
-
Access type: Read-only
Indicates the type of job being tracked by this object.
-
-
Unknown (0)
-
Define Virtual Machine (1)
-
Modify Virtual Machine (2)
-
Destroy Virtual Machine (3)
-
Modify Management Service Settings (4)
-
Initialize Virtual Machine (10)
-
Waiting to Start Virtual Machine (11)
-
Start Virtual Machine (12)
-
Power Off Virtual Machine (13)
-
Save Virtual Machine (14)
-
Restore Virtual Machine (15)
-
Shut Down Virtual Machine (16)
-
Pause Virtual Machine (26)
-
Resume Virtual Machine (27)
-
Reset Virtual Machine (28)
-
Reboot Virtual Machine (29)
-
Add Virtual Machine Resources (30)
-
Modify Virtual Machine Resources (31)
-
Remove Virtual Machine Resources (32)
-
Request Initial Virtual Machine Memory (40)
-
Add Memory to Virtual Machine (41)
-
Remove Memory from Virtual Machine (42)
-
Merging VHD Disks (50)
-
Create VSS Snapshot inside Virtual Machine (51)
-
Get Import Setting Data (60)
-
Import Virtual Machine (61)
-
Export Virtual Machine (62)
-
Register Configuration (63)
-
Unregister Configuration (64)
-
Snapshot Virtual Machine (70)
-
Apply Virtual Machine Snapshot (71)
-
Delete Virtual Machine Snapshot (72)
-
Clear Virtual Machine Snapshot State (73)
-
Add Resources to Resource Pool (80)
-
Remove Resources from Resource Pool (81)
-
Modify Replication Server Settings (90)
-
Create Replication Relationship (91)
-
Modify Replication Relationship Settings (92)
-
Remove Replication Relationship (93)
-
Start Inband Initial Replication (94)
-
Import Replication (95)
-
Replicate State Change (96)
-
Initiate Failover (97)
-
Revert Failover (98)
-
Commit Failover (99)
-
Inititate Synced Replication (100)
-
Cancel Synced Replication (101)
-
Initiate Test Replica (102)
-
Remove Test Replica (103)
-
Reverse Replication (104)
-
Replication Sending Delta (105)
-
Replication Receiving Delta (106)
-
Resynchronizing (107)
-
Apply change log (108)
-
Stop Initial Replication (109)
-
Stop Resynchronizing (110)
-
Get Replica statistics (111)
-
Prepare for Consistency Checker (112)
-
Consistency Checker (113)
-
Stop Consistency Checker (114)
-
Test Replication Connection (115)
-
Sending Initial Replica (116)
-
Start Resync Initial Replication (117)
-
Start Export Initial Replication (118)
-
Reset Replica Statistics (119)
-
Apply Registered Deltas (120)
-
Resynchronizing Extended Replication (121)
-
Reading Test Replica Configuration (122)
-
Change the replication mode to primary (123)
-
Initiate Failback (124)
-
Update Disk Set (125)
-
Note
Value added in Windows 10.
-
Define Ethernet Switch (130)
-
Modify Ethernet Switch Settings (131)
-
Destroy Ethernet Switch (132)
-
Add Ethernet Switch Resources (133)
-
Modify Ethernet Switch Resources (134)
-
Remove Ethernet Switch Resources (135)
-
Validate Planned Virtual Machine (140)
-
Realizing Virtual Machine (141)
-
Creating a Resource Pool (150)
-
Changing the Parent Resources of a Resource Pool (151)
-
Changing the Non-alloction Settings of a Resource Pool (152)
-
Deleting a Resource Pool (153)
-
Enable RemoteFx GPU (160)
-
Disable RemoteFx GPU (161)
-
Modify 3D Service Settings (162)
-
Note
Value added in Windows 10.
-
Backup Virtual Machine (170)
-
Guest Service Interface (180)
-
Note
Value added in Windows 10.
-
Query Guest Cluster Information (181)
-
Note
Value added in Windows 10.
-
Define Collection (190)
-
Note
Value added in Windows 10.
-
Destroy Collection (191)
-
Note
Value added in Windows 10.
-
Rename Collection (192)
-
Note
Value added in Windows 10.
-
Add Member to Collection (193)
-
Note
Value added in Windows 10.
-
Remove Member from Collection (194)
-
Note
Value added in Windows 10.
-
Add Setting to Collection (195)
-
Note
Value added in Windows 10.
-
Remove Setting from Collection (196)
-
Note
Value added in Windows 10.
-
Modify Setting on Collection (197)
-
Note
Value added in Windows 10.
-
Snapshot Collection (198)
-
Note
Value added in Windows 10.
-
Convert Snapshot to Reference Point (200)
-
Note
Value added in Windows 10.
-
Create Reference Point (201)
-
Note
Value added in Windows 10.
-
Delete Reference Point (202)
-
Note
Value added in Windows 10.
-
Export Reference Point (203)
-
Note
Value added in Windows 10.
-
Remove Associated Data from Reference Point (204)
-
Note
Value added in Windows 10.
-
Create Reference Point on Collection (205)
-
Note
Value added in Windows 10.
-
Export Reference Point on Collection (206)
-
Note
Value added in Windows 10.
-
Remove Associated Data from Reference Point on Collection (207)
-
Note
Value added in Windows 10.
-
Delete Reference Point on Collection (208)
-
Note
Value added in Windows 10.
-
Import Reference Point metadata (209)
-
Note
Value added in Windows 10 as Cleanup Reference Point.
-
Mount or Dismount Assignable Device (260)
-
Note
Value added in Windows 10.
LocalOrUtcTime
-
Data type: uint16
-
Access type: Read-only
Indicates whether the times represented in the RunStartInterval and UntilTime properties represent local times or UTC times. This property is inherited from CIM_Job.
-
Local Time (1)
-
UTC Time (2 )
Name
-
Data type: string
-
Access type: Read-only
-
Qualifiers: Key, MaxLen ( 256 )
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. This property is inherited from CIM_ManagedSystemElement.
Notify
-
Data type: string
-
Access type: Read-only
The user that is notified upon job completion or failure. This property is inherited from CIM_Job.
OperatingStatus
-
Data type: uint16
-
Access type: Read-only
Provides current status information for the operational condition of the element and can be used for providing more detail with respect to the value of the EnabledState property. A Null value indicates that this property is not implemented. This property is inherited from CIM_ManagedSystemElement.
OperationalStatus
-
Data type: uint16 array
-
Access type: Read-only
The current statuses of the object. This property is inherited from CIM_ManagedSystemElement, and each array element is always set to 2 (OK).
OtherRecoveryAction
-
Data type: string
-
Access type: Read-only
A string that describes the recovery action when the RecoveryAction property of the instance is 1 (Other). This property is inherited from CIM_Job.
Owner
-
Data type: string
-
Access type: Read-only
The user who submitted the job. This property is inherited from CIM_Job.
PercentComplete
-
Data type: uint16
-
Access type: Read-only
-
Qualifiers: MinValue ( 0 ), MaxValue ( 100 ), Units ( "Percent" )
The completion percentage of the job. This property is inherited from CIM_Job.
PrimaryStatus
-
Data type: uint16
-
Access type: Read-only
Provides high level status information. This property should be used in conjunction with the DetailedStatus property to provide high level and detailed health status of the element and its subcomponents. A Null value indicates that this property is not implemented. This property is inherited from CIM_ManagedSystemElement.
Priority
-
Data type: uint32
-
Access type: Read-only
The importance of a job's execution. This property is inherited from CIM_Job.
RecoveryAction
-
Data type: uint16
-
Access type: Read-only
Describes the recovery action to be taken for a job that did not run successfully. This property is inherited from CIM_Job.
-
Unknown (0)
-
Other (1)
-
Do Not Continue (2)
-
Continue With Next Job (3)
-
Re-run Job (4)
-
Run Recovery Job (5 )
RunDay
-
Data type: sint8
-
Access type: Read-only
-
Qualifiers: MinValue ( -31 ), MaxValue ( 31 )
The day of the month on which the job should be processed. There are different interpretations for this property, depending on the value of RunDayOfWeek.
When RunDayOfWeek is 0 and RunDay is positive, RunDay defines the day of the month on which the job is processed. For example, if RunDayOfWeek is 0 and RunDay is 12, then the job will be processed on the 12th day of the month.
When RunDayOfWeek is 0 and RunDay is negative, RunDay defines the number of days before the last day of the month on which the job is processed. 1 indicates the last day of the month, 2 indicates one day before the last day of the month, and so on. For example, if RunDayOfWeek is 0 and RunDay is 1, then the job will be processed on the last day of the month.
When RunDayOfWeek is not 0, RunDayOfWeek is the day of the week that the job will be processed, relative to RunDay. For example, if RunDay is 15 and RunDayOfWeek is 7 (+Saturday), the job will be processed on the first Saturday on or after the 15th day of the month. If RunDay is 20 and RunDayOfWeek is 7 ( Saturday), the job will be processed on the first Saturday on or before the 20th day of the month. If RunDay is 1 and RunDayOfWeek is 1 ( Sunday), then the job will be processed on the last Sunday of the month.
This property is inherited from CIM_Job.
RunDayOfWeek
-
Data type: sint8
-
Access type: Read-only
A positive or negative integer used in conjunction with RunDay to indicate the day of the week or month on which the job is processed. See the description of the RunDay property for more information. This property is inherited from CIM_Job.
-
-Saturday ( 7)
-
-Friday ( 6)
-
-Thursday ( 5)
-
-Wednesday ( 4)
-
-Tuesday ( 3)
-
-Monday ( 2)
-
-Sunday ( 1)
-
ExactDayOfMonth (0)
-
Sunday (1)
-
Monday (2)
-
Tuesday (3)
-
Wednesday (4)
-
Thursday (5)
-
Friday (6)
-
Saturday (7 )
RunMonth
-
Data type: uint8
-
Access type: Read-only
The month during which the job should be processed. This property is inherited from CIM_Job.
-
January (0)
-
February (1)
-
March (2)
-
April (3)
-
May (4)
-
June (5)
-
July (6)
-
August (7)
-
September (8)
-
October (9)
-
November (10)
-
December (11 )
RunStartInterval
-
Data type: datetime
-
Access type: Read-only
The time interval after midnight when the job should be processed. This property is inherited from CIM_Job.
ScheduledStartTime
-
Data type: datetime
-
Access type: Read-only
The scheduled start time for the job, if applicable. This property is inherited from CIM_Job.
StartTime
-
Data type: datetime
-
Access type: Read-only
The time that the job began. This property is inherited from CIM_Job.
Status
-
Data type: string
-
Access type: Read-only
This property is inherited from CIM_ManagedSystemElement, but it is not used.
StatusDescriptions
-
Data type: string array
-
Access type: Read-only
Strings that describe the various OperationalStatus array values. This property is inherited from CIM_ManagedSystemElement, and each array element is always set to "OK".
TimeBeforeRemoval
-
Data type: datetime
-
Access type: Read-only
The amount of time, in minutes, 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. This property is inherited from CIM_ConcreteJob, and it is always set to 00000000000500.000000:000.
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. This property is inherited from CIM_ConcreteJob.
TimeSubmitted
-
Data type: datetime
-
Access type: Read-only
The time that the job was submitted. This property is inherited from CIM_Job.
UntilTime
-
Data type: datetime
-
Access type: Read-only
The time at which the job is not valid or should be stopped. This property is inherited from CIM_Job.
Remarks
Access to the Msvm_ConcreteJob class might be restricted by UAC Filtering. For more information, see User Account Control and WMI.
Requirements
Requirement | Value |
---|---|
Minimum supported client |
Windows 8 [desktop apps only] |
Minimum supported server |
Windows Server 2012 [desktop apps only] |
Namespace |
Root\Virtualization\V2 |
MOF |
|
DLL |
|