Hi Max,
The CompletionDate attribute is set in job records for jobs that completed execution (success or failure), but not when a job is removed from the Schedd. I'm sure if you do
condor_history -const 'CompletionDate==0' -af:hj JobStatus you will see only the number 3 (job removed status number).
A suggestion would be to use EnteredCurrentStatus attribute since that should always be defined and be set to the time when the AP switched the job status in the record i.e. time of removal/completion.
Cheers,
Cole Bollig
From: HTCondor-users <htcondor-users-bounces@xxxxxxxxxxx> on behalf of Kühn, Max (SCC) <max.fischer@xxxxxxx>
Sent: Wednesday, June 25, 2025 3:27 AM To: HTCondor-Users Mail List <htcondor-users@xxxxxxxxxxx> Subject: [HTCondor-users] Unintended weirdness of -completedsince? Hi all,
We’ve just stumbled over a „bug“ in our tooling when using `condor_history` with `-since`/`-completedsince`. It looks like all cancelled jobs have a CompletionDate of 0. This means that using `-since 'CompletionDate<=timestamp‘` or `-completedsince timestamp` often stops very early. We noticed this during a lucky sanity check when a query returned 20 instead of about 2000 results. Is this intentional? It’s straightforward to workaround for `-since` if one is aware, but it makes `-completedsince` completely (and silently) useless. We’re running 23.X (schedd) and 24.0 (startd) in case this matters. Cheers, Max [0] [root@htcondor-ce-1-kit ~]# condor_history -constraint 'CompletionDate == 0' -match 15 ID OWNER SUBMITTED RUN_TIME ST COMPLETED CMD 5483417.0 alicesgm 6/23 06:52 1+23:49:26 X 1/1 01:00 agent.startup.8905 5483380.0 alicesgm 6/23 06:49 1+23:49:39 X 1/1 01:00 agent.startup.8905 5483382.0 alicesgm 6/23 06:49 1+23:31:55 X 1/1 01:00 agent.startup.8905 5483415.0 alicesgm 6/23 06:52 1+23:31:38 X 1/1 01:00 agent.startup.8905 5482132.0 alicesgm 6/23 04:22 1+23:31:58 X 1/1 01:00 agent.startup.8905 5470731.0 lhcbprd 6/21 21:55 3+09:26:06 X 1/1 01:00 DIRAC_nd_ggtyn_pilotwrapper.py 5483040.0 alicesgm 6/23 06:19 1+23:16:59 X 1/1 01:00 agent.startup.8905 5483378.0 alicesgm 6/23 06:49 1+23:16:18 X 1/1 01:00 agent.startup.8905 5481589.0 alicesgm 6/23 03:11 1+23:14:05 X 1/1 01:00 agent.startup.8905 5481410.0 alicesgm 6/23 02:51 1+23:13:58 X 1/1 01:00 agent.startup.8905 5483071.0 alicesgm 6/23 06:20 1+23:09:05 X 1/1 01:00 agent.startup.8905 5490482.0 lhcbprd 6/23 18:01 0+12:51:50 X 1/1 01:00 DIRAC_r3ynm_3g_pilotwrapper.py 5481151.0 alicesgm 6/23 02:11 1+23:17:28 X 1/1 01:00 agent.startup.8905 5481195.0 alicesgm 6/23 02:21 1+23:17:32 X 1/1 01:00 agent.startup.8905 5481176.0 alicesgm 6/23 02:17 1+23:15:50 X 1/1 01:00 agent.startup.8905 |