[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [HTCondor-users] return codes from jobwrapper

On 3/10/20 3:21 PM, Beyer, Christoph wrote:

just a quick question, given that we do use the jobwrapper anyway I want to establish some deeper checks for afs token etc. before executing $CMD in case I do consider the environment not suitable which exit codes are available for the jobwrapper process to

Hi Christoph:

If this is a USER_JOB_WRAPPER, then that script is passed an environment variable, _CONDOR_WRAPPER_ERROR_FILE. If the job wrapper writes anything to this file (and exits with a well-known code), the job will go back to idle, and the first line that your script writes to the file named by that env variable will be put into the user log file in the Shadow Exception message. You can then use one of the various job policy expressions like ON_EXIT_HOLD to put the job on hold, or remove it from the queue.


a) put the job in hold with a hold reason
b) put the job back in the queue as idle
c) finish the job altogether and remove it from queue with state 'X'