Get-HpcJob

Get-HpcJob

Gets jobs.

Syntax

Parameter Set: id
Get-HpcJob [[-Id] <Int32> ] [-BeginSubmitDate <DateTime> ] [-ClusterConnectionString <String[]> ] [-EndSubmitDate <DateTime> ] [-Name <String> ] [-Owner <String> ] [-Pool <String> ] [-Project <String> ] [-Scheduler <String[]> ] [-State <JobState> {Configuring | Submitted | Validating | ExternalValidation | Queued | Running | Finishing | Finished | Failed | Canceled | Canceling | All} ] [-TemplateName <String> ] [ <CommonParameters>]

Parameter Set: nodename
Get-HpcJob [-ClusterConnectionString <String[]> ] [-NodeName <String[]> ] [-Scheduler <String[]> ] [ <CommonParameters>]




Detailed Description

The Get-HpcJob cmdlet gets jobs that match the specified values for the submission time, job ID, name, owner, project, state, or scheduler properties for the job. By default, this form of 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 ID, the state, or the owner of the jobs that you want to get.

Alternatively, the Get-HpcJob cmdlet gets a list of jobs that are running on one or more specified nodes.

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.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ClusterConnectionString<String[]>

Specifies an array of cluster connection strings for the cluster to which you want to add the device drivers. The value format is host1,host2,host3. If you do not specify the ClusterConnectionString parameter, this cmdlet uses the connection string on the head node that the CCP_CONNECTIONSTRING environment variable specifies. To set this environment variable, run the following cmdlet: Set-Content Env: CCP_CONNECTIONSTRING <head_node_name>.

This parameter was introduced in HPC Pack 2016.


Aliases

none

Required?

false

Position?

named

Default Value

none

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.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Id<Int32>

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


Aliases

none

Required?

false

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-Name<String>

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


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-NodeName<String[]>

Specifies an array of compute nodes for which you want to get the currently running jobs. This parameter is a filter parameter, so you do not receive an error for specifying a node the does not exist in the HPC cluster as long as you specify at least one node that does exist.


Aliases

none

Required?

false

Position?

named

Default Value

none

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.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Pool<String>

Specifies the name of the resource pool used by the jobs you want to get.

This parameter was introduced in HPC Pack 2008 R2 with Service Pack 2 (SP2). It is not supported in previous versions.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Project<String>

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


Aliases

none

Required?

false

Position?

named

Default Value

none

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>


Aliases

none

Required?

false

Position?

named

Default Value

none

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. Valid values 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 ID with the Id parameter, the Get-HpcJob cmdlet gets the job with that job ID, regardless of the state of that job.


Aliases

none

Required?

false

Position?

named

Default Value

none

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.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

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

Inputs

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

  • None

Outputs

The output type is the type of the objects that the cmdlet emits.

  • HpcJob[]

Examples

Example 1: Get a job by ID

This command gets the job with an ID of 4 on the cluster with the head node MyHeadNode.


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

Example 2: Get jobs by date

This command gets jobs submitted on and after January 1, 2008 and before January 25, 2008.


PS C:\> $Start = Get-Date -Year 2008 -Month 1 -Day 1
PS C:\> $End = Get-Date -Year 2008 -Month 1 -Day 25
PS C:\> Get-HpcJob -BeginSubmitDate $Start -EndSubmitDate $End

Example 3: Get jobs by user name

This command gets all jobs that the user with the user name pfuller in the CONTOSO domain submitted for the project named Experiments.


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

Related topics

Community Additions

ADD
Show: