Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

Stop-HpcJob

Applies To: Windows HPC Server 2008

Cancels one or more specified jobs.

Syntax

Stop-HpcJob [-Message <string>] [-Scheduler <string>] [-Id] <int[]> [-confirm] [-whatif] [<CommonParameters>]

Stop-HpcJob [-Message <string>] [-Scheduler <string>] -Job <HpcJob[]> [-confirm] [-whatif] [<CommonParameters>]

Detailed Description

Cancels one or more specified jobs. You can use specify the job by using either the identifiers or HpcJob objects for the jobs. You can also specify the cluster that contains the jobs that you want to cancel, and an error message to explain why you canceled the jobs.

When you cancel a job, the job scheduler removes the job from the job queue if the job is waiting to run. If the job is running, the scheduler stops the tasks that are running and frees the resources they were using for allocation to another job.

Only an administrator or the owner of the job can cancel a job.

Parameters

-Id <int[]>

Specifies a list of identifiers for the jobs that you want to cancel. Specify either the Id parameter or the Job parameter, but not both.

 

Required?

true

Position?

1

Default Value

no default

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Job <HpcJob[]>

Specifies a list of HpcJob objects that represent the jobs that you want to cancel.

 

Required?

true

Position?

named

Default Value

no default

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-Message <string>

Specifies an error message to provide to the user that explains why you canceled the job.

 

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 to which you submitted the job. 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

-Confirm

Prompts you for confirmation before executing the command.

 

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

Describes what would happen if you executed the command without actually executing the command.

 

Required?

false

Position?

named

Default Value

none

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

One or more HpcJob objects.

Return Type

None.

Example 1

C:\PS>Stop-HpcJob -Id 45 -Message "Clearing space for Job 51, which needs to run immediately."

Cancels the job with an identifier of 45 and provides the user with a cancellation message that explains that you canceled the job to make room for a different job to run.

See Also

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.