Export (0) Print
Expand All

Get-HpcJob

Gets a list of jobs that match the specified criteria.

Syntax

Get-HpcJob [-BeginSubmitDate <DateTime>] [-EndSubmitDate <DateTime>] [-Name <string>] [-Owner <string>] [-Project <string>] [-Scheduler <string>] [-State <JobState[]>] [-TemplateName <string>] [[-Id] <int>] [<CommonParameters>]
Get-HpcJob [-NodeName <string[]>] [-Scheduler <string>] [<CommonParameters>]

Detailed Description

Gets a list of jobs the match the specified values for the submission time, job identifier, name, node, owner, project, state, and scheduler properties for the job. By default, the Get-HpcJob cmdlet only gets jobs that have a state of queued or running and that belong to the current user, unless you specify the job identifier, the state, or the owner of the jobs that you want to get.

Parameters

-BeginSubmitDate <DateTime>

Specifies a DateTime object that begins the date and time range during which the jobs that you want to get were submitted.

Use the BeginSubmitDate and EndSubmitDate parameters to specify a time period. The Get-HpcJob cmdlet gets all jobs submitted within this time period when you specify both parameters.

If you specify only the BeginSubmitDate parameter, the search time period is between the value of the BeginSubmitDate and the time that you run the Get-HpcJob cmdlet.

You can create a DateTime object by running the Get-Date cmdlet.

 

Required?

false

Position?

named

Default Value

no default

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-EndSubmitDate <DateTime>

Specifies a DateTime object that ends the date and time range during which the jobs that you want to get were submitted.

Use the BeginSubmitDate and EndSubmitDate parameters to specify a time period. The Get-HpcJob cmdlet gets all jobs submitted within this time period when you specify both parameters.

If you only specify the EndSubmitDate parameter, the search time period is before the value specified for the EndSubmitDate parameter.

You can create a DateTime object by running the Get-Date cmdlet.

 

Required?

false

Position?

named

Default Value

the current date and time

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Id <int>

Specifies the identifier of the job that you want to get.

 

Required?

false

Position?

1

Default Value

no default

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Name <string>

Specifies the name of that job that you want to get.

 

Required?

false

Position?

named

Default Value

no default

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-NodeName <string[]>

Specifies a list of compute nodes for which you want to get the currently running jobs.

 

Required?

false

Position?

named

Default Value

no default

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Owner <string>

Specifies the owner of the jobs that you want to get, in the domain\user_name format.

 

Required?

false

Position?

named

Default Value

Environment.UserName

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Project <string>

Specifies the project name for the jobs that you want to get.

 

Required?

false

Position?

named

Default Value

no default

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Scheduler <string>

Specifies the host name or IP address of the head node for the cluster for which you want to get the jobs. The value must be a valid computer name or IP address. If you do not specify the Scheduler parameter, this cmdlet uses the scheduler on the head node that the CCP_SCHEDULER environment variable specifies. To set this environment variable, run the following cmdlet:

Set-Content Env:CCP_SCHEDULER <head_node_name>

 

Required?

false

Position?

named

Default Value

%CCP_SCHEDULER%

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-State <JobState[]>

Specifies a list of one or more states for the jobs that you want to get. The possible states are:

* Configuring

* Submitted

* Validating

* ExternalValidation

* Queued

* Running

* Finishing

* Finished

* Failed

* Canceled

* Canceling

* All

If you do not specify the State parameter, the Get-HpcJob cmdlet only gets by default the jobs that are in the queued or running states, unless you specify the Id parameter. If you specify an identifier with the Id parameter, the Get-HpcJob cmdlet gets the job with that job identifier, regardless of the state of that job.

 

Required?

false

Position?

named

Default Value

Queued,Running

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-TemplateName <string>

Specifies name of the job template used by the jobs that you want to get.

 

Required?

false

Position?

named

Default Value

no default

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters.

Input and Return Types

The input type is the type of the objects that you can pipe to the cmdlet. The return type is the type of the objects that the cmdlet emits.

 

Input Type

None.

Return Type

One or more HpcJob objects.

Example 1

C:\PS>Get-HpcJob -Id 4 -Scheduler "MyHeadNode"

Gets the job with an identifier of 4 on the cluster with the head node MyHeadNode.

Example 2

C:\PS>$Start = Get-Date -year 2008 -month 1 -day 1$end = Get-Date -year 2008 -month 1 -day 25 Get-HpcJob -BeginSubmitDate $start -EndSubmitDate $end

Gets jobs submitted on and after January 1, 2008 and before January 25, 2008.

Example 3

C:\PS>Get-HpcJob -Project "Experiments" -Owner "CONTOSO\someone"

Gets all jobs that the user with the user name someone in the CONTOSO domain submitted for the project named Experiments.

See Also

Concepts

New-HpcJob
Set-HpcJob
Submit-HpcJob

Other Resources

Get-Date

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft