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

Re: [HTCondor-users] Parsing the cluster id from condor_submit

condor_submit -terse


condor_submit -verbose

are both designed to be parsed.

I would recommend using -terse. which prints just the first and last job-id to stdout.
When submitting a single job first and last id will be the same

> condor_submit -terse sleep.sub -queue 1
15918.0 - 15918.0

>condor_submit -terse sleep.sub -queue 2
15919.0 - 15919.1


From: HTCondor-users <htcondor-users-bounces@xxxxxxxxxxx> on behalf of Jonathan Martin <JMartin@xxxxxxxxxxxx>
Sent: Monday, February 14, 2022 6:09 PM
To: HTCondor-Users Mail List <htcondor-users@xxxxxxxxxxx>
Subject: [HTCondor-users] Parsing the cluster id from condor_submit

I have some code that parses the cluster ID from condor_submit based on stdout, where stdout would show something like:


Submitting 12 job(s)……

12 job(s) submitted to cluster 1064


Is there a better method to return the cluster ID from a condor_submit command? I worry about this output inevitably changing at some point and don’t want to lean on this for production workflows.




This communication (both the message and any attachments or links) is confidential and only intended for the use of the person or persons to whom it is addressed unless we have expressly authorized otherwise. It also may contain information that is protected by solicitor-client privilege. If you are reading this communication and are not an addressee or authorized representative of an addressee, we hereby notify you that any distribution, copying or other use of it without our express authorization is strictly prohibited. If you have received this communication in error, please delete both the message and any attachments from your system and notify us immediately by e-mail or phone. In addition, we note that this communication and its transmission of data have not been secured by encryption. Therefore, we are not able to confirm or guarantee that the communication has not been intercepted, amended, or read by an unintended third party.