The CurrentExecutionStatus property filters jobs listed in the JobServer object EnumJobs method, restricting the returned QueryResults object to list only those jobs whose execution state matches the value set.
object.CurrentExecutionStatus [= value]
Part | Description |
---|---|
object | Expression that evaluates to an object in the Applies To list |
value | Specifies a job execution status as described in Settings |
Constant | Value | Description |
---|---|---|
SQLDMOJobExecution_ BetweenRetries |
3 | List only jobs that are waiting for a retry attempt time slice to end |
SQLDMOJobExecution_Executing | 1 | List only executing jobs |
SQLDMOJobExecution_Idle | 4 | List only jobs that are awaiting scheduled execution |
SQLDMOJobExecution_ PerformingCompletionActions |
7 | List only jobs logging job history or performing other cleanup tasks |
SQLDMOJobExecution_Suspended | 5 | List only suspended jobs |
SQLDMOJobExecution_Unknown | 0 | Ignore execution status when filtering |
SQLDMOJobExecution_ WaitingForStepToFinish |
6 | List only jobs waiting for a step to finish |
SQLDMOJobExecution_ WaitingForWorkerThread |
2 | List only jobs blocked by waiting for an execution thread resource |
Long, enumerated
Read/write
HRESULT GetCurrentExecutionStatus(
SQLDMO_JOBEXECUTION_STATUS* pRetVal);
HRESULT SetCurrentExecutionStatus(
SQLDMO_JOBEXECUTION_STATUS NewValue);