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

Re: [HTCondor-users] How do I get the environment variable of the condor job if its interactive?

On Mar 25, 2021, at 5:41 PM, brando.hpcs@xxxxxxxxx wrote:

Hi Everyone,

I usually got the job id with:
but I don't see it set if it's an interactive job. Is there a way to set it? When I am given the resources I see that there is a job id for my job. Is there a way to get it?

Submitting job(s).
1 job(s) submitted to cluster 4869.
Waiting for job to startâ

I assume youâre using condor_submit -interactive with a submit file that has something like this in it:

environment = MY_CONDOR_JOB_ID=$(Cluster)

I just tried this myself and was surprised to see that the environment variables requested in my submit file were not present in the interactive shell session (though they were present for a non-interactive job). And HTCondor doesnât set the job id in any special environment variables for the job. We will investigate, as this looks like a bug.

Thanks and regards,
Jaime Frey
UW-Madison HTCondor Project