pbs_alterjob man page

pbs_alterjob — alter pbs batch job

Synopsis

#include <pbs_error.h>
#include <pbs_ifl.h>

int pbs_alterjob(int connect, char *job_id, struct attrl *attrib,
char *extend)

int pbs_alterjob_async(int connect, char *job_id, struct attrl *attrib,
char *extend)

Description

Issue a batch request to alter a batch job.

A Modify Job batch request is generated and sent to the server over the connection specified by connect which is the return value of pbs_connect(). When the asynchronous pbs_alterjob_async() call is used, the server will validate the request and reply before modifying the job. This version of the call can be used to reduce latency in scheduling, especially when the scheduler must modify a large number of jobs.

The argument, job_id, identifies which job is to be altered, it is specified in the form: sequence_number.server

The parameter, attrib, is a pointer to an attrl structure which is defined in pbs_ifl.h as:

struct attrl {
    char *name;
    char *resource;
    char *value
    struct attrl *next;
};

The attrib list is terminated by the first entry where next is a null pointer.

The name member points to a string which is the name of the attribute. The value member points to a string which is the value of the attribute. The attribute names are defined in pbs_ifl.h:

#define ATTR_a "Execution_Time"
Alter the job's execution time.
#define ATTR_A "Account_Name"
Alter the account string.
#define ATTR_c "Checkpoint"
Alter the checkpoint interval.
#define ATTR_e "Error_Path"
Alter the path name for the standard error of the job.
#define ATTR_g "Group_List"
Alter the list of group names under which the job may execute.
#define ATTR_h "Hold_Types"
Alter the hold types.
#define ATTR_j "Join_Path"
Alter if standard error and standard output are joined (merged).
#define ATTR_k "Keep_Files"
Alter which output of the job is kept on the execution host.
#define ATTR_l "Resource_List"
Alter the value of a named resource.
#define ATTR_m "Mail_Points"
Alter the points at which the server will send mail about the job.
#define ATTR_M "Mail_Users"
Alter the list of users who would receive mail about the job.
#define ATTR_N "Job_Name"
Alter the job name.
#define ATTR_o "Output_Path"
Alter the path name for the standard output of the job.
#define ATTR_p "Priority"
Alter the priority of the job.
#define ATTR_r "Rerunable"
Alter the rerunable flag.
#define ATTR_S "Shell_Path_List"
Alter the path to the shell which will interprets the job script.
#define ATTR_u "User_List"
Alter the list of user names under which the job may execute.
#define ATTR_v "Variable_List"
Alter the list of environmental variables which are to be exported to the job.
#define ATTR_depend "depend"
Alter the inter-job dependencies.
#define ATTR_stagein "stagein"
Alter the list of files to be staged-in before job execution.
#define ATTR_stageout "stageout"
Alter the list of files to be staged-out after job execution.

If attrib itself is a null pointer, then no attributes are altered.

Associated with an attribute of type ATTR_l (the letter ell) is a resource name indicated by resource in the attrl structure. All other attribute types should have a pointer to a null string ("") for resource.

If the resource of the specified resource name is already present in the job's Resource_List attribute, it will be altered to the specified value. If the resource is not present in the attribute, it is added.

Certain attributes of a job may or may not be alterable depending on the state of the job; see qalter(1B).

The parameter, extend, is reserved for implementation defined extensions.

See Also

qalter(1B), qhold(1B), qrls(1B), qsub(1B), pbs_connect(3B), pbs_holdjob(3B), and pbs_rlsjob(3B)

Diagnostics

When the batch request generated by the pbs_alterjob() or pbs_alterjob_async() function has been completed successfully by a batch server, the routine will return 0 (zero). Otherwise, a non zero error is returned. The error number is also set in pbs_errno.

Info

Local PBS