How to Provide a Job Name When Submitting a PBS Job
Overview
When submitting a job to PBS, you can pass the job name directly using the following code.
Code1
-N {JOB_NAME}
Using the -N option, you can pass the job name as shown above. It can be up to 15 characters long, must consist of printable characters with no spaces, and the first character must be an alphabetic letter. A name specified with -N takes precedence over a name set in the job file.
(base) [user ~]$ qsub -N new_name test
The contents of the test file are as follows. It was set to print the job name.
#!/bin/sh
#PBS -N old_name
#PBS -q full
#PBS -l select=1:ncpus=1:ngpus=0
echo $PBS_JOBNAME
exit 0
As shown in the image below, you can confirm that the job name was set to the name passed directly with the -N option.

