Create Job

Creates a new job on the HPC cluster, for which the specified properties have the specified values.

Request

You can specify the Create Job request as follows.

MethodRequest URI
POSThttps://head_node_name:port/WindowsHPC/HPC_cluster_name/Jobs

 

For instances of the REST web service that are hosted in Azure, the head node name should have a format of Windows_Azure_service_name.cloudapp.net.

To get the name to use for an HPC cluster that runs at least Microsoft HPC Pack 2008 R2 with Service Pack 3 (SP3), use the Get Clusters operation.

URI Parameters

You can specify the following additional parameters on the request URI.

ParameterDescription
api-version

Optional. Specifies the version of the operation to use for this request. To specify Microsoft HPC Pack 2008 R2 with Service Pack 3 (SP3), use a value of 2011-11-01. The minimum version that supports this URI parameter is Microsoft HPC Pack 2008 R2 with SP3.

The value of this URI parameter is ignored if the request also contains the api-version header.

 

Request Headers

The following table describes required and optional request headers.

Request HeaderDescription
api-version

Optional. Specifies the version of the operation to use for this request. To specify Microsoft HPC Pack 2008 R2 with SP3, use a value of 2011-11-01. The minimum version that supports this header is Microsoft HPC Pack 2008 R2 with SP3.

The value specified in this header overrides the value specified in the api-version URI parameter if both are specified.

CCP_Version

Optional. Specifies the version of the operation to use for this request.

Deprecated beginning with Microsoft HPC Pack 2008 R2 with Service Pack 3 (SP3).

 

Request Body

The format of the request body is as follows.


<ArrayOfProperty xmlns="http://schemas.microsoft.com/HPCS2008R2/common" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
    <Property>
        <Name>Property Name</Name> 
        <Value>Property Value</Value>
    </Property>
    <Property>
        <Name>Property Name</Name>
        <Value>Property Value</Value>
    </Property></ArrayOfProperty>

The following table describes each of the elements in this request XML.

ElementDescription
ArrayOfProperty

Represents the set of properties for the job for which you want to set values. To create a job using the default values for all of the properties, use an empty ArrayOfProperty element.

Property

Represents a single property for the job.

Name

Contains the name of the property that you want to set.

Value

Contains the value to which you want to set the property.

 

Response

The response includes an HTTP status code, a set of response headers, and a response body in XML format.

Status Code

A successful operation returns status code 200 (OK). For more information about status codes, see HttpStatusCode.

The error response is dependent upon the api-version used in the request. If the api-version is not provided, or CCP_Version is specified, then the error response will be an XML string (Note: The error message will vary based on the error):


<string xmlns="http://schemas.microsoft.com/2003/10/Serialization/">Error message text.</string>


If the api-version is 2011-11-01 or later, the error message will be a more descriptive XML response (Note: Values will vary based on the error):


<HpcWebServiceFault xmlns="http://schemas.microsoft.com/HPCS2008R2/common" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <Code>267386880</Code>
  <Message>Error message text.</Message>
  <Values i:nil="true" xmlns:a="http://schemas.datacontract.org/2004/07/System.Collections.Generic"/>
</HpcWebServiceFault>

Response Headers

The response for this operation includes the following headers.

Response HeaderDescription
x-ms-hpc-authoritychain

A comma-separated list of RFC 1918 IP addresses that indicate the sequence of instances of the REST web service that the operation called in order from to right.

Only responses from instances of the REST web service that are hosted on Azure contain this header. Responses from instances of the REST web service that are hosted on premise omit this header.

This header is supported beginning with Microsoft HPC Pack 2008 R2 with SP3 and is not available in previous versions.

 

The response for this operation also includes standard HTTP headers. All standard headers conform to the HTTP/1.1 protocol specification.

Response Body


<int xmlns="http://schemas.microsoft.com/2003/10/Serialization/">Job Identifier</int>

The response XML consists of a single int element that contains the job identifier of the job that the HPC Job Scheduler Service created.

Remarks

The job that this operation creates has no tasks. You must add a task to the job by using the Add Task operation before you submit the job to the HPC cluster with the Submit Job operation.

The following table shows the job properties for which you can set the values. For information about the property, see the corresponding property of the ISchedulerJob interface or JobPropertyIds class in the managed API for Microsoft HPC Pack. To set the value of properties that have an IStringCollection interface for a value in the managed API, such as RequestedNodes, use a comma-separated list of values in the Value element of the request.

PropertyCorresponding ISchedulerJob or JobPropertyIds Property
NameISchedulerJob.Name
UserNameISchedulerJob.UserName
ProjectISchedulerJob.Project
RuntimeSecondsISchedulerJob.Runtime
MinCoresISchedulerJob.MinimumNumberOfCores
MaxCoresISchedulerJob.MaximumNumberOfCores
MinNodesISchedulerJob.MinimumNumberOfNodes
MaxNodesISchedulerJob.MaximumNumberOfNodes
MinSocketsISchedulerJob.MinimumNumberOfSockets
MaxSocketsISchedulerJob.MaximumNumberOfSockets
UnitTypeISchedulerJob.UnitType
RequestedNodesISchedulerJob.RequestedNodes
IsExclusiveISchedulerJob.IsExclusive
RunUntilCanceledISchedulerJob.RunUntilCanceled
NodeGroupsISchedulerJob.NodeGroups
FailOnTaskFailureISchedulerJob.FailOnTaskFailure
AutoCalculateMaxISchedulerJob.AutoCalculateMax
AutoCalculateMinISchedulerJob.AutoCalculateMin
PreemptableISchedulerJob.CanPreempt
MinMemoryISchedulerJob.MinMemory
MaxMemoryISchedulerJob.MaxMemory
MinCoresPerNodeISchedulerJob.MinCoresPerNode
MaxCoresPerNodeISchedulerJob.MaxCoresPerNode
SoftwareLicenseISchedulerJob.SoftwareLicense
OrderByISchedulerJob.OrderBy
ClientSourceISchedulerJob.ClientSource
ProgressISchedulerJob.Progress
ProgressMessageISchedulerJob.ProgressMessage
TargetResourceCountISchedulerJob.TargetResourceCount
ExpandedPriorityISchedulerJob.ExpandedPriority
ServiceNameISchedulerJob.ServiceName
NotifyOnStartISchedulerJob.NotifyOnStart
NotifyOnCompletionISchedulerJob.NotifyOnCompletion
EmailAddressISchedulerJob.EmailAddress
PriorityISchedulerJob.Priority
PasswordJobPropertyIds.Password
JobTemplateISchedulerJob.JobTemplate
PoolISchedulerJob.Pool
JobValidExitCodesISchedulerJob.ValidExitCodes
ParentJobIdsISchedulerJob.ParentJobIds
FailDependentTasksISchedulerJob.FailDependentTasks
NodeGroupOpISchedulerJob.NodeGroupOp
SingleNodeISchedulerJob.SingleNode
ChildJobIdsISchedulerJob.ChildJobIds
EstimatedProcessMemoryISchedulerJob.EstimatedProcessMemory

 

Requirements

Product

HPC Pack 2008 R2 with at least SP2, or a later version of HPC Pack.

 

 

Show: