End a Run Until Canceled Job as Finished

Applies To: Windows HPC Server 2008

If you are ready to end a job that is set to run until it is canceled and you want the final job state to be flagged as Finished rather than as Canceled, you can modify the job so that the RunUntilCanceled property is set to False. When there are no running or queued tasks remaining in the job, the job will be flagged as Finished.

Important

To modify a job, you must be the job owner (the submitting user) or a cluster administrator.

To end a job that is set to run until it is canceled as Finished

  1. In HPC Job Manager, in the views pane, right-click the job that you want to finish, then click Modify.

  2. In the Modify Job dialog box, in Job details, under Job run options, clear the Run job until cancelled or run time expires check box.

  3. Click Modify to apply the change and close the dialog box.

  4. You can check the state of your job in the views pane, and the state of its tasks in the Detail Pane.

To modify a job, you can use the job modify command or the Set-HpcJob cmdlet. The following table lists the command-line commands and HPC PowerShell cmdlets that you can use to modify the RunUntilCanceled property and to check the job and task state.

Task Command Prompt window HPC PowerShell

List your running jobs to find the job ID of the job you want to finish.

job list /state:running

get-HpcJob –state running

Modify the RunUntilCanceled property, where jobID is the ID of the job you want to finish.

job modify <jobID> /rununtilcanceled:false

set-HpcJob –id <jobID> -rununtilcanceled 0

Check the state of the job and its tasks where jobID is the ID of the job.

job view <jobID>

get-HpcJob –id <jobID> | fl

Filter the job list in HPC PowerShell

HPC PowerShell provides additional options for filtering the job list:

  • To list only jobs that have the RunUntilCanceled property set to True, type:

    Get-HpcJob –State Running | Where-Object –FilterScript {$_.RunUntilCanceled –eq “True”}

  • To list only the job ID and the RunUntilCanceled property for running jobs, type:

    Get-HpcJob –State Running | Select-Object –Property Id,RunUntilCanceled

Additional references