Share via


jobtemplate add

 

Applies To: Microsoft HPC Pack 2012, Microsoft HPC Pack 2012 R2

Adds a job template to the HPC cluster by using the settings in the specified job template XML file.

For examples of how to use this command, see Examples.

Syntax

jobtemplate add /file:[<path>\]<file_name> [/scheduler:<name>]
[/template:<template_name>]

jobtemplate add {/? | /help}

Parameters

Parameter

Description

/file:[<path>\]<file_name>

Specifies the file name of that you want to use to create the job template, including the full or relative path if the job template XML file is not in the current directory.

/scheduler:<name>

Specifies the host name or IP address of the head node for the cluster to which you want to add the job template. The value must be a valid computer name or IP address. If you do not specify the /scheduler parameter, this command uses the scheduler on the head node that the CCP_SCHEDULER environment variable specifies.

/template:<template_name>

Specifies a name to use for the job template. The maximum length of the name of a job template is 50 characters. The value can be any alphanumeric string that is less than the maximum length except the name of any existing job template or "default", which is reserved for the default template. To specify a name that includes spaces, enclose the name in double quotation marks (" ").

If you do not specify the /template parameter, the jobtemplate add command assigns a name to the job template that is the same as the value that the Name attribute of the JobTemplate element in the XML file specifies, if a job template with that name does not already exist.

If you specify a name for the job template with the /template parameter that differs from the value that the Name attribute of the JobTemplate element in the XML file specifies, the value that the /template parameter specifies overrides the value that the XML file specifies.

/?

Displays Help at the command prompt.

/help

Displays Help at the command prompt.

Remarks

  • Job templates are stored centrally on the head node. When you import a new job template, users with administrative credentials on the head node have full Control, Modify, and Submit jobs permissions on the job template by default. Local users on the head node have Submit permissions on the job template. For information about changing permissions on the job template, see the Help for the job template deny, job template grant, and job template remove commands.

  • Only administrators with administrative credentials on the head node can add new job templates.

Examples

To add a job template to the HPC cluster by using the settings in the job template XML file that is located at C:\MyTemplates\JobTemplate1.xml, use the following command:

jobtemplate add /file:C:\MyTemplates\JobTemplate1.xml

To add a job template named MyNewJobTemplate to the HPC cluster by using the settings in the job template XML file located at C:\MyTemplates\NewJobTemplate.xml, use the following command:

jobtemplate add /file:C:\MyTemplates\NewJobTemplate.xml /template:MyNewJobTemplate

Additional references